Take out the center hinge pin and put it in a vice.
Stiffen door hinges.
If the hinge screws have been loose for only a short time you may need to tighten them with a screwdriver.
Reinstall it and check the result.
Smack it with a hammer to put a slight bend in it.
If you encounter movement at the hinge screws they need to be retightened.
Drill and tap a hole on each of the knuckle of the hinge so that you can screw a couple set screws in so that it pokes the hinge pin.
If more resistance is needed bend the pin more or bend a second pin.
You can use olive oil butter paraffin candles wd 40 spray petroleum jelly or simply a bar of bath soap.
Put the pin back in and it will stop the door from swinging.
If one is loose remove two or more screws and try driving in longer screws.
Remove the top or middle hinge pin and use a hammer to bend it just slightly.
The tighter that you tighten the set screws the more resistance.
Simple quick and works like a.
On the latch side a door is cut at a slight bevel to make it easier to close.