the game engine you're going to use really depends on what type of games you are trying to develop, UE is best suited for big or corporate level game development as it takes less time to work with assets in UE, that's why most PC AAA games uses UE
unity is more prolific in the mobile development industry since it's light weight & still powerful but that doesn't mean that unity is BAD at PC
I've played PC good games developed in unity, for a beginner assuming that you're just getting into the business .
i would recommend you to learn unity as the flexibility is one of the key aspects, unity is cross platform & very easy to use even a normal guy could jump start learning unity with just YouTube videos
i hope this helps you decide on what you would learn first.