With few exceptions, it’s not a single person sitting at a computer pouring out the code.
Start off with a game engine. There are a few big jobs of the engine. One is to figure out all the things the player can see. The software pretends there’s a camera at some coordinate location then calculates all the things they can see including the ground, walls, objects, other players, enemies, etc. Then this goes through a bunch of matrix math (often done by the graphics card) to compute how to render it to your screen. Lighting goes through this too, as simulated light sources affect the textures of things around them, so the engine has to provide ways to illuminate your world so the player can see.
Another big job of the engine is to determine the physics. You attack an enemy, shoot a projectile, run into a wall, or just about anything else, and the engine will determine what if anything affects the various characters. This tells the software not to allow the player to run through walls or that their shot hit an enemy so the game can figure out what that means and how to deal with that.
The engine provides a starting point. You have programmers who specify how objects may interact with each other. You have modelers who create the virtual representation of things for the engine to render. You have animators who specify how those models stretch and bend to display actions. You have sound people create effects and music for your game. You have voice actors who record the thousands of lines that may be voiced throughout the game. You have testers to play through various parts of the game over and over and over to try to find ways to break it so that programmers can address issues that arise.
Guiding all this are leads who coordinate the different groups. They create and maintain the overall goal of what the game should look like and what steps the various teams need to accomplish to reach it.