you cant be afraid to use your pawns, and you have to protect them all you can. Like you said, in the endgame, pawns will be very important, and every pawn matters. Also, if the opponent has free pawns, it is always good to take them. This is my non-helpful-but-trying-to-be-helpful-response to your question.
How to preserve pawns for the endgame as a beginner

Hi,I am happy to help..I am 1800 chess player and I am have this question everytime I play with lower rated players.let me tell you ,I stream chess for 1200-1800 rated players where I highlight opening mistakes ,middle game strategy and mindset of other player and solve tactics live with viewers to solve.I also play games with viewers who wants to taste what 1800 rating looks like where as other high rated don't prefer to play or you ll not be eligible to send them challenge. If you think I can help you to reach atleast 1800 rating in chessdotcom like me, drop me a follow on twitch.tv/corporatechessguy for live streaming, send me a friend request on chessdotcom and you can also subscribe to my youtube channel ( https://www.youtube.com/results?search_query=corporatechessguy). Remember you will definitely get better and atleast able to figure out dangers in board when you play with others. Hope to see you around! You can also share with other friends who have interests like you to grow.Thanks!
Hey guys,
I am a chess beginner and I notice that everytime the endgame turns into a pawn marathon, I have considerably less pawns, like 2 vs 5. This also means that I end up losing because the opponent can easily exchange a pawn for a queen. How do I make sure that during the matches I play I end up not falling behind on pawns? I feel like latching onto them too dearly in the game will end up with me losing as well because I am too afraid to use my pawns. Any ideas? Thanks!