Page 496 of Collins Cobuild English Usage reads
You form 'yes/no'-questions with used to by putting did in front of the subject, followed by use to: Did you use to do that, when you were a kid?
WARNING: many people use used to instead of use to in questions. However, some people consider that this use is incorrect,
Did you used to play with your trains?
If the 'wh'-word is the object of the clause, or part of the object, you use the auxiliary do after it, followed by the subject and used to,
What did you used to do on Sundays?
I'd like to know why use to isn't possible in the second structure, What did you use to do on Sundays?
USED: https://oed.com/oed2/00273881