The verb "to have" is often a "helping verb" and is used to create the perfect tenses.
However, "to have" is also a legitimate verb in its own right I have a job I like. He has two kids. She had a minor surgical procedures. I was having fun.
Therefore, you use the form of "to do" to create questions involving the verb "to have" as you do any other verb.
I like to run. Do you like to run?
I have a toothcace. Do you have a toothache?
I had an appointment yesterday. Did you have an appointment yesterday?