I'm relatively new to Stack Overflow as a whole; why do I get reputation for telling others that my post is good?
You cannot actually vote for your own contributions. As to why you get reputation for accepting an answer to your question it’s to encourage you to accept answers to your question– RamhoundApr 8, 2022 at 4:03
From our help center there is What is reputation? How do I earn (and lose) it?– Mokubai ModApr 8, 2022 at 6:39
Side note: as a whole this network of Q&A websites is Stack Exchange. Stack Overflow is a part of Stack Exchange; so is Super User. Super User is not a part of Stack Overflow.– Kamil MaciorowskiApr 10, 2022 at 22:44
The +2 reputation you saw was from accepting an answer on your question (see What's Reputation for details.
This minor reputation gain is designed to incentivize the asker accepting an answer. Having an accepted answer on a question makes it more useful for future users as it points them to the "best" answer (in your eyes, at least) for the question.