I thought that I already know how the Electrophilic Aromatic Substitution (EArs) for Aromatic rings work but then this reaction was shown to me and I was really sure that my professors didn't bothered teaching or even mentioning to us this reaction:
In my defense, at my University, our Org Chem professors always use benzene or benzene derivative rings for demonstration of EArS so I never knew how an acylation of a five-membered aromatic ring works.
Can someone please explain to me how this reaction works?

