How do you code a game

i doo not now how to get there

What is your coding background? What do you mean by “game”? Do you mean a simple little game or some complex, graphics intensive grand game?

In any case, if you look on youtube, you will find examples of people coding simple games.

That very much depends on what game you want to code. My first game was Rock-Paper-Scissors, I used HTML CSS and JavaScript.

Well, that’s a good start for learning some basic coding. You can make some simple browser based games with that. And learn some basic coding skills. But if you mean a video game that runs as an app on the computer, then you would probably be using some other language, like C, C++, C# with Unity, etc. There is a whole ecosystem of languages, libraries, and frameworks. And of course there are mobile games, so that would be Java/Kotlin or Objective-C/Swift or a library like React Native. I would google “how to become a videogame developer” and read what you find. There is probably more than one path - but any of them will be moving you in the right direction.

I used to make games 2d in unity with c# and c++, for simple games most you need to know is logic operators(if, while, case), two channel that help a lot in start: