Just to add to this, pi-hole provides configuration steps on how to do this in their documentation.
EDIT: I did make a post about DoT and DoH a while ago. I found the users answers in the thread pretty helpful / informative, so I thought I would add it as a reference if @pgaccount decides to try and configure this.