Preheat the oven to 425 degrees F (220 degrees C).
Combine garlic, rosemary, oregano, salt, and pepper in a small bowl. Rub spice mixture all over the pork tenderloin. Place in a baking dish.
Bake in the preheated oven until pork is slightly pink in the center, 20 to 25 minutes. An instant-read thermometer inserted into the center should read at least 145 degrees F (63 degrees C). Remove from oven and let stand for 5 minutes before slicing.