The interrogative form is different if the verb is an ‘auxiliary’ verb (to be, to have, will, can, etc.), or a ‘normal’ (non-auxiliary) verb.
Interrogative of auxiliary verbs
Interrogative of normal verbs (non-auxiliary verbs)
Inverting the auxiliary to form the interrogative