The engine doesn't matter too much.
The problems and how you solve them are usually sort of the same, in terms of 2d and 3d. Meaning:
If you're doing a 2d platformer or a 3d platformer, you will still need to thing about colliding with the floor and the solution will be similar too. For art, it's the same. if you start from scratch, learning 2d art and learning 3d art is both new to you. But you will have animations in both and engines usually just use some "playanimation" function. So 2d vs. 3d is completely up to you and what you want to make.
I can recommend pygame and panda3d if you like python. They're not new engines and they're "code only". Other engines give you an editor, but I prefer the "code only" approach, because there are no hidden settings that you have to search for in the GUI, it's just code.
But the other engines like godot and unity have a ton of learning material too, so that's probably easier to get started with.
)