Really depens on what kind of game you trying to make.
If 2D - Use Unity. If 3D - Both Work, but 'd recommend to start with Unity, since it has... Literally everything to start off with. You have a bunch of shaders from Unity Market (or whatever it's called) and GitHub, you can get models for free, there's even pre-done game projetcs, if you're very lazy to start from scratch. You can just look at the code that unity uses (C#Sharp) and then try to make something yourself. Hell, some company made a custom shader-maker plugin!..Which you have to pay like 60$, but I'm sure you can find a pirated copy lol.
Sadly, Unity has a bad reputation, because of all bad games made on it (mainly because of the free unity watermark on game startup, if you didnt pay for pro version of Unity). But can you really blame the creators of Unity for that? It's not that the engine is bad, it's the people that use it to make bad games on it (and also make those chinese bitcoin miners on Google Play, you know those, named "Super Spider-Rope Hero 3D: San Andreas 3D City Battle" or something).
Unreal Engine is also good, but if you don't optimize your game properly, I guess not alot of people will be able to play your UE4 games. Haven't used it myself personally, but my friend did.
But, It's just my personal opinion, it could be different for you.