Preheat oven to 375˚F.
Place garlic cloves over a small sheet of foil and drizzle with 2 teaspoons of oil. Place directly onto an oven rack and roast for 30 minutes.
Fill a large pot with water and bring to a boil. Add pasta and season water generously with salt.
Bring mixture back to a boil and cook pasta, stirring occasionally until pasta is al dente, 6 to 8 minutes. Drain, reserving about 2 cups pasta water, and pour pasta back into the pot.
Add remaining oil to a small skillet and place over medium heat. Add shallots and sauté for 3 to 4 minutes.
Remove from heat and transfer to a blender. Drain cashews and add to blender along with 1 1/2 cups pasta water, roasted garlic cloves and nutritional yeast. Blend until mixture is smooth. Season with salt and pepper and add more pasta water, if needed. Pulse a few times.
Pour ‘alfredo’ sauce over the pasta and toss together until completely coated. Adjust seasonings, top with thyme or basil and serve.