Gambit problem

Learn the opening principles. That way, when you do not know the opening, you will be able to rely on those principles and play good moves without knowing the theory. Actually, you will often end up playing some opening theory without even knowing it.

Chess Openings Resources for Beginners and Beyondβ¦
https://www.chess.com/blog/RussBell/openings-resources-for-beginners-and-beyond
https://www.chess.com/blog/RussBell

don't play gambits as a beginner. very risky
This is not true. As a beginner, playing anything is okay, Openings are irrelevant, only middlegame blunders matter. To get better, a beginner needs to reduce the number of ridiculous blunders. Thinking about openings is not fruitful.