To make /t/ and /d/ sounds as in "tin and den", we put the tip of tongue against the ridge behind the teeth (not touching the teeth). but when we say a word ending in /t/ or /d/ before a word beginning with /th/ as in "thin" or "this", we may prouounce the /t/ or /d/ with the tip of tongue farther forward (touching the teeth) in order to get ready for the next sound, as in " he said this; I got these; I should think; put this here."
Hope this is helpful for somebody!