Have someone you trust watch the front of the car when you drive in, drive very slowly until they say "stop" when you are 4-5 inches from the wall, so you are in the garage enough.
Then back up, and do it again a few times. Once you're comfortable knowing how long your car is on the bit you can't see (lower front bumper), then drive in slowly and stop where you think you should, with the person watching to shout "stop" but only at the last minute.
I know 5-6 inches sounds like already the last minute, but once you have done this a few times you'll recognise that nearly half a foot leeway is actually quite a bit. And you only need to be less than 8 inches away from the wall, which is nearly 3/4 of a foot.
This will teach you the length of the car, and will allow you to park your car anywhere. The tennis ball and sticks ideas are truly great, but they are not present at the supermarket, golf club, or other places you could park where there could also be limited room. Or where you want the car parked tight in so no-one catches the back with a trolley/other vehicle/etc.
It also helps you have more confidence when pulling out of being parked between two cars (front and back) in a street.
While you'd need to "re-learn" if you changed your car, you also have to reposition sticks and tennis balls too, but with this method, once you have the technique and experience, then learning a new car is pretty simple.