just practice! Practice, practice, practice ๐ game jams are a good way of doing that.
Try things. Don't be afraid to just get stuck in: if something works, figure out why it worked. If something doesn't work, figure out why it didn't.
All this comes over time. You'll get there!