Assuming he’s otherwise normal and this is a behavioural problem, there is a product of the market called Copro-nil, given orally it makes his faeces taste less pleasant and he’ll stop doing it. Do it for long enough, a few months, and hopefully he’ll be out of the habit. Its not prescription, so you can get it online or your vets.
If he’s starving hungry, underweight, undersized then he would need a blood test to check things like his pancreatic enzyme production, small intestinal absorption etc. If he’s otherwise fit and strong, try copro-nil first. It has a b1 supplement in it, but generally a few dogs stop doing it with a vitamin supplement also, though they should get what they need in normal dog food. As he gets older, they do less of this sort of thing. Some do it if they’ve been confined in a small pen for rehoming along time too.
Other optins are a cage muzzle, but people will think you have n aggressive dog. If you need to wash his mouth, a dog mouthwash called Hexarinse is available to kill bacteria. Again its not prescription.
Dont rub his face in it, he will just think your encouraging him to eat it.