The Pi OS comes with Python installed, the pygame libraries, a bunch of games written in Python and of course the source code so you can modify them and create your own.
Wasn’t Minecraft Pi Edition discontinued years ago? Minetest on the other hand might be a great intro to programming with its Lua script mods, and also has always been designed for modest hardware.
Yah, it’s technically functional, but there’s an actively maintained alternative that can support such advanced features as spawning mobs (like, say, the mascot in Minecraft’s logo).
The RPi400 with Pico-8 seems to tick the same boxes, so I got one for my 10yr old. He's loving it. Perfect use case.
[0] https://colorcomputerarchive.com/repo/Documents/Books/Write%...