A game that lets players play with software development is an excellent way to introduce programming concepts and coding, such as loops and conditional statement. Zachtronics Shenzhen I/O is www.mrworkspace.nl/2020/09/05/managed-workspace-sessions-by-board-room/ one game that does this. It puts players in the shoes of disgruntled engineers who work for a boring company and have to build computer chips by hand. They are given increasingly complex circuits to design, starting with the making lights flash in a particular pattern.
The interface of the game is similar to the one you see in browsers, and it teaches scripting. Screeps is another excellent example, which combines JavaScript code with massively multiplayer online gaming in order to create self-sustaining colonies. Both games do a fantastic job of teaching basic concepts while gradually introduction of new ones.