I like to "cup" my hand to my ear and that sometimes gets people to repeat what they say. Or I say "sorry, I'm deaf" point to my ear and that'll let them know they need to be more clear.
Other times I cannot hear them at all so I will ask them to write it down on paper. (Especially if they have a very strong accent ).
I'm hard of hearing, can you say that again? Or I don't hear well, please speak slower. Thank you.
Practice helps a lot. No one person will be perfect but the more you do the more confidence you'll get.
If you have smartphone try out these apps:
Also I love to use Big Notes apps on my phone especially at the deli or when ordering something so they don't mess up.
Google Live Transcribe app has been helpful. It's like real time captioning. Again it's not perfect but it can give you clues to what they are saying.