Heat the toaster oven (or conventional oven) to 400°.
Place the pork tenderloin in a shallow ovenproof dish.
Cut 6 (1-inch) slits evenly spaced across the top, insert the garlic pieces, and season well with salt and freshly ground black pepper.
Let sit at room temperature for 20 minutes while the oven is heating.
In a small bowl, mix together the apricot preserves, lemon juice, red pepper flakes, and cumin. (If the preserves are still thick, add more lemon juice; don’t add too much, though, because the mixture should remain dense, not be runny.)
Season with salt and freshly ground black pepper.
Coat the tenderloin with olive oil and roast for 20 minutes.
Remove from the oven and spread evenly with the apricot mixture.
Return the pork to the oven and roast for another 5 to 10 minutes, or until the internal temperature reaches 160°F.
Remove from the oven and let rest 5 to 10 minutes before slicing and serving.