If you already know programming, then a lot of games are written with either the Unreal engine (using C++) or Unity (using C#).
There are certainly exceptions. Minecraft was originally written in Java, but I don't know of any other major games using Java. Undertale was made in GameMaker Studio. Any game with a custom engine is likely using C or C++, but I wouldn't try writing your own engine unless you really know what you're doing. It is not a task for the inexperienced.
But all languages are used. Minecraft was written in Java. A guy called Michal Ziulek is working on game development ecosystem for Zig, which I think is really neat.
It depends what platform you wanna release the game on. Google your favorite game and type programming language along with it.