As and like can both be used to compare, but they are not used in the same way. Like is followed by a noun or a pronoun (a person or a thing). As is followed by a person + a verb, or it gives someone's role or job.
Use like to say that two things are similar. It is followed by a noun or a pronoun.
Structure: like + noun/pronoun
As has two main uses:
Structure: as + subject + verb
In everyday speech, many people use like before a person + verb. In formal English, use as.
Join 100,000 people who are improving their English skills on the Shaky English app