Both game engines are particularly good at 2D game development, although Godot does have tools for making 3D games. If you're ...
Unreal Engine is surprisingly accessible with Blueprints, while Godot is the best for beginners ... ultimately if you're interested in making a 2D game, GameMaker is a much better bet.