Did You vs Have You?
Have You Is Usually Used in the Second Person. So Is the Case with Did You. Have You Is Sometimes Used Independently as a Single Expression Following the Main...
Have you is usually used in the second person. So is the case with did you. Have you is sometimes used independently as a single expression following the main sentence. Did you is used along with a verb only.
Did you have vs do you have?
Did you have is the interrogatory form of you had. It is correct. Do you have would suggest that you currently have a prior marriage.
Did you do it vs have you done?
Why did you do it is a fine way to ask about an event done in the past. Why have you done it implies there are consequences in the present still.