AI aside, coding is a lot of fun but actually making a game is very hard work. There's a lot that goes into it, not just code, and every one of those things is immensely complicated.
I wouldn't even think of the money aspect.
I learned through making games before AI became a thing. It's a great way to learn and have fun doing it, but you will quickly burn out if you expect to be making something sellable in a short time frame. Every game engine has a lot of intricacies so there's learning the software on top of it as well. There is more involved than a simple flask app for example, even if it's just beginner stuff.