The question word what and who can act both as a subject or an object. Depending on that, the structure of the sentence will be different.
Study these examples
What did you see?
Who owns this company?
Whom did Mike call?
If "what" or "who" is the subject in the sentence, we don't need an auxiliary verb. The main verb goes after the question word:
What/Who + verb + ...?
Examples of what and who as a subject
What happened to Paul? He fell down the ladder.
What is hanging on the wall? A painting is hanging on the wall.
What makes you happy? Love makes me happy.
Who is knocking at the door? A postman is knocking at the door.
Who made this armchair? My grandfather made it himself.
Who knows the answer? Jenny knows the answer.
If what/who is the object in the sentence, we need an auxiliary verb.
What/Whom + auxiliary verb + subject + main verb + ...?
Examples of what and who as an object
What did you learn at the lesson? I learnt some new grammar rules.
What does John want from me? He wants some help.
Whom is Amanda calling now? She is calling her friend.
Whom do they believe? They believe us.
What, Who or Whom?
||Question is not about a person
||Question is about a person
|Question word = subject
|Question word = object
The question word what never changes, it doesn't matter if it is a subject or an object. We use "what" to make questions about things, abstract terms, but not about people.
We use the question word who when we ask questions about a person or people.
If the question word is a subject, it means we can replace it with a personal pronoun in its basic form (Who did it? He did it. Who cares? She cares.). Then we should say who.
If the question word is an object, it means we can replace it with a personal pronoun in its objective case (Whom do you help? I help him.). In this case, it is better to use whom. However, in conversation and informal writing, it is more common to say "who".
Examples of who and whom
Who is calling you? ≠ Whom are you calling?
Who drank my tea? ≠ Whom did you drink tea with?
Who gave you this book? ≠ To whom did you give the book?
Who got the prize? ≠ Whom did the prize go to?