It would've made sense to take out the UK first as Germany already had a non-agression pact with the USSR. My thinking was Germany first defeats the UK and get her to sign an armistice giving Germany a "free hand" in continental Europe. Then Germany turns their entire war machine to the USSR.
From the FAQ:
Did Germany and The Soviet Union ever consider becoming allies in WWII? by /u/kieslowski_fan
EDIT: added the answers I linked in follow up comments
Additionally: Why did Hitler attack The Soviet Union so early? Wouldn’t it have made more sense to finish up the war with The UK before attacking them as to not create a two-front war? written by u/andriah_blashkovich
and
Why did Hitler attack Russia (aka the Soviet Union) in the winter? Didn't he learn anything from Napoleon? written by u/Starwarsnerd222 gives a long answer to a somewhat related question, but briefly touches on some of the rationale behind the invasion of the Soviet Union over defeating Britain first