What Joe said. Coding in any form is all about solving problems. Unity is a 3d engine. You can make 2d games, as you have seen, with it as well but those 2d games exist in a 3d space.
Check out enter the Gungeon… awesome 2d game made with unity.
Unity does, however, have separate physics and stuff for 2d and 3d and they don’t really work well together out of the box. But I’m sure with enough thought you can make it do what you want :). This is the problem solving part.
I would first learn the basics of c#. Microsoft virtual Academy has an awesome fundamentals course to get you started and it doesn’t take that long to go through it. Make sure you practice what you learn after every video though!!! You will find that if you just watch them back to back you will go to write some code and forget how everything was done.
After that, I would go through the unity tutorial that teaches you about the UI and where everything is and what it does.
Next, go through the project tutorials, both the 2d ones and the 3d ones. Do those to completion. If you have an issue due to old unity versions or something not doing what it is supposed to, ask for help on forum. But make sure you complete them all. This will get you comfortable with unity and some c#.
Next, go through the scripting tutorials.
Finally, think of super simple games and try to make one completely from scratch with your own graphics (circles and squares or blocks are fine). Example: pong, brick breaker. Ask for help if you get stuck.
Keep making more and more complex games from there on or adding features/levels to your games or even the tutorials you did. You will be surprised how much you know after a year.
The goal is to get comfortable with your tools, which will be unity and c#, before going out there and trying to solve problems with them (making games).
Game development is HARD!!! You will want to quit, you will want to break your keyboard, and you will want to punch the monitor. It isn’t for everyone, but everyone who has started the journey has felt like this at times. Ask for help and always come back, try to spend at least some time everyday on it. If you are super busy at least spend 5 minutes to look over and review some of your code or play the game a bit to test it.
Goodluck!