i feel like this is lots of questions in one, so i'll try to unpack it and answer things from a few different angles. sorry if i'm misinterpreting what you were asking!
Q: how do i program games in general?
A: make lots of tiny games and get a feel for it! i personally use my own game engine and i program things in a very simple and straightforward procedural manner, with C structs, fixed-size arrays, for loops and not much else, but that's because i have lots of professional game/engine programming experience and i hate object-oriented programming. lots of other people prefer to use various engines or frameworks or programming languages or programming styles. just make sure you're programming in a way that makes it as easy as possible to modify aspects of your game, even beyond the prototyping stage.
Q: how do i program a game prototype?
A: same as above, but it's even more important that it's easy to modify aspects of the game.
Q: how do i decide what to prototype (if anything) for a game i want to make?
A: a prototype exists to help you decide what your game should be like, and whether or not you even want to make the game in the first place. so it heavily depends on what type of game you're making, how big it is, and how strict your personal standards are of what you want to make.
if you're making a tiny experimental game with low-fidelity assets, making the full game probably takes barely any more time than making a prototype so you might as well just make it all.
if you're someone like me who is weirdly obsessed with the exact nuances of action game mechanics and enemy design, you probably want to start by prototyping a room full of enemies that you can fight over and over while tweaking everything until you're satisfied (or until you decide that the game idea isn't as good as you thought it would be).
the above applies to basically every other genre too. start off by making sure that you like the most important part of your game enough for it to be worth making the full game, and then grow that prototype into a small version of the full game (e.g. a full level, boss encounters, rpg elements) to figure out exactly how the full game should work, then make the game.
Q: how do i decide what to prototype (if anything) for a grand strategy game?
A: i have never even played a grand strategy game, let alone thought about making one, so i'm not the best person to ask. i guess the questions to ask are which parts of your game idea you care about and what you would do if they ended up being bad. if you have a specific idea for some mechanics or vibes and you want to know if they're fun, you could throw together a pen/paper/dice prototype or make a quick and janky mod for an existing game. if you're determined to build a grand strategy game regardless of whether or not your current idea ends up being fun, then you might as well just start programming a grand strategy game. because even if your idea for a grand strategy game ends up not living up to your standards in practice, you can just reuse the code to make another one.
i'll use fighting games as an analogy, because we're both familiar with them and they also require lots of programming just to get a serviceable prototype up and running. if you knew that you wanted to dedicate lots of your life to making fighting games, you could go learn as much as possible about how other fighting games are put together and then start making your own fighting game while building your own framework or engine. but if you just had one specific idea for a fighting game that you wanted to try, you could throw something together in an existing fighting game framework, make a mod for an existing fighting game, or even just apply some house rules to an existing game and test it with your friends. like you could prototype divekick by playing mvc3 doom mirrors without dashing or blocking, and you could prototype a swordfighting anime fighting game with no jumps by playing johnny mirrors and never jumping.
so uh, do that. make whatever you need to make as quickly as possible that helps you figure out whether or not you like the game, while considering what you're likely to do next if the game idea doesn't live up to your standards. let me know if there's anything i didn't cover, and feel free to reach out via the contact info in my profile any time!