I would say a little of both. Some of the most important bottlenecks a new game dev will encounter is "number of colors, screen resolution, sound properties" etc.
The CPU speed is also limited but it's a different kind of challenge to try to make a game be so complicated that there's enough math to even do to challenge the available CPU allocation given how few permutations of screen space are available to try to alter.
Depending on your game, RAM limitation and program space limitation might also come into play.
But the artificial limitations are only one element to why the platform is popular, the other element is the tooling.
Much like using Unity, Unreal, Roblox, etc you have loads of primitives and coding features (and music and SFX creation suites) at your fingertips built right into the platform, and how the limitations help here is to cap how subtle and complicated a person's goals are liable to be in order to help refocus the developer's attention back onto the gameplay loop.
The java 4k contest was fun (make a java applet game that is at most a 4096 bytes JAR, including all assets the game needs). Unfortunately I only discovered it shortly before it shut down (when no browsers supported java applets anymore). I did enter one year and it was not by coincidence that was the only time in 40 years of hobby-gamedev that I shared a game I made with people online.
It was a lot of fun to try to squeeze a game into 4 kB but I can definitely also admit that part of it was being able to use the extreme limit as an excuse for making things simpler and not have to worry about the game being ugly or not having sounds or not having a title screen and all the other 90% of stuff that would have been expected to turn it into a complete game.
I play around a bit with TIC-80. Some say it is just an open source PICO-8 and I guess it is to some extent. I paid for both but I have not spent as much time with PICO-8. I like that TIC-80 supports quite many different programming languages, but maybe PICO-8 does as well these days? There is no super obvious reason to use one or the other, so I go with the one with free source code.
Real retro gamedev is tempting, but it is difficult to find a real console that were heavily restricted while also being convenient to develop for. The fantasy consoles cheat a bit in being restricted like some early 1980's hardware while running code like some 2010's game engine. It's like the best of both worlds, but also a bit boring compared to writing something actually limited to what some old console could do.
The CPU speed is also limited but it's a different kind of challenge to try to make a game be so complicated that there's enough math to even do to challenge the available CPU allocation given how few permutations of screen space are available to try to alter.
Depending on your game, RAM limitation and program space limitation might also come into play.
But the artificial limitations are only one element to why the platform is popular, the other element is the tooling.
Much like using Unity, Unreal, Roblox, etc you have loads of primitives and coding features (and music and SFX creation suites) at your fingertips built right into the platform, and how the limitations help here is to cap how subtle and complicated a person's goals are liable to be in order to help refocus the developer's attention back onto the gameplay loop.