This is a great tip, but it’s not always the correct answer.
Since the trim will be in place it’s going to be hard to see the cap from the hinge to the actual framing.
In most cases, you should have about 3/4″ inches. I always like to use a 3″ screw. If you can use a power screw gun, this will make things a lot easier. However, you don’t want to overpower and bury the screw so deep that something will break.
Some doors have three or even four hinges. If the door is hitting from the top, use the top hinge. And so on.
Remove one small screw from that hinge and replace it with the longer screw (3″) Tighten just enough that will allow the frame to suck in so the door is not hitting. Pretty simple, right.