This issue arises when you don't know the openings well enough.
First off your objective in the opening is to occupy the center and gain an advantage using that. Chasing after pieces will most likely end up getting you in trouble especially if you're the type of player who prefers not to give away the queen.
So for starters you need to actually check out some openings and how they go, preferably don't start with complicated openings that have a lot of lines and have a certain objective... Rather take simple openings (and by simple that doesn't mean they are bad, in fact they are very good). I usually advise beginners with the Italian Game opening for white and French Defense for black.
However, no one can really tell you when to stop going after a piece... It is completely situational, you have to know whether or not you will get cornered if you go after the piece or if you will win it... And in the end, the most important question, is it even worth it? There might be other moves that make your position better and that don't involve taking a piece.
^^That was the main answer, if you're interested in more, please do keep reading :)
f4 (Bird's Opening) is definitely not an opening a beginner should play. There are main disadvantages to pushing an early f4 in the game that literally make holes in your defense but at the same time improves your offense. So try to avoid Bird's Opening for now if you can.
Now for the most important part, try not to be a materialist... There are many type of players and Materialist is one of them. It's the type of player that values pieces and doesn't want to let them go (like Queens Knights etc...) Being a materialist will hinder your development later on. Ignore the queen, and see the beauty of the other pieces. The queen alone will never win you the game, there's a reason you have knights, bishops and rooks on the board.
For the most part you will most likely have trouble knowing when to exchange a good piece for a bad piece and vise versa... But you'll learn that as you play.
Also, sacrificing pieces in chess is one of the classical ways of attacking an opponent... Never overlook a sacrifice, don't limit your imagination and keep thinking ahead! That's how you improve in chess... Don't even ignore a stupid sacrifice, you might see it as a stupid one, but it might actually be a good one... And the only way you will know whether or not it is, is to actually try it.
Hope I helped and if you have anymore questions feel free to ask I'll answer to the best of my abilities :)