Ideally have your tenderloin at room temperature. Preheat oven to 425.
Peel and cube your squash.
Put olive oil in a medium bowl big enough to hold all the cubed squash, snip in rosemary leaves and press garlic right into the oil. If you don’t have a garlic press handy, just smash and chop the garlic finely. Dice the shallot and throw that in too.
Place tenderloin in roasting pan and take about 1 tbsp of the garlicky herby oil, drizzle it over the tenderloin and rub it in.
Now dump the cubed squash into the bowl with the remaining garlicky oil and toss till cubes are lightly coated with the garlicky oil. Arrange around the the tenderloin in the roasting pan.
Salt everything as much as you like. If there is any herb flavored oil left in the bottom of the bowl pour or scrape it onto the tenderloin.