How does Han join the Empire at the beginning of Solo: A Stars Wars Story?
There was a recruitment advertisement playing over PA which goes like this,
Be a part of something. Join the Empire. Explore new worlds. Learn valuable skills. Bring order and unity to the galaxy! Be a part of something. Join the Empire.
Now, since Storm-troopers were checking IDs and Han didn't have any, it was very likely that he would get captured and then he will not be able to fulfill his dreams. Besides he also wanted to be the best pilot in the galaxy and the Empire sounded like a perfect opportunity for this.
Han: This is where I sign up to be a pilot, right?
Officer: If you apply for the Imperial Navy, but most recruits go into the infantry.
Han: I'm gonna be a pilot. Best in the galaxy.
So, all he has to do to go to the place where recruits were getting hired. So he signed up and joined the empire.