If you're having trouble getting the garlic and rosemary to stick to the tenderloin, rub a little olive oil on the tenderloin.
Some meat thermometers are too top-heavy to stand up in a pork tenderloin so try inserting it almost horizontally, or sideways, into the pork. Using an instant-read thermometer is another option but it isn't ovenproof and can't be left in the pork.
Crush garlic by placing the clove in a garlic press and pushing down on the handle. If you don't have a garlic press, finely chop the garlic with a chef knife.
When using dried rosemary, crumble the leaves in the palm of your hand to release more flavor before rubbing them over the pork.