Preheat and boil: Set the oven temperature to 375°F, or 190°C. Bring a big pot of water that has been salted to a boil.
Cook pasta: Cook pasta to al dente, which is one to two minutes shorter than the time specified on the package. After draining the pasta and setting it aside, save about 1 cup of the cooking water.
Make the Alfredo sauce:
Melt the butter in a medium saucepan over medium heat. Sauté the two minced garlic cloves for 30 to 45 seconds until aromatic, but do not allow them to brown.
After adding the heavy cream, boil gently for three to four minutes while stirring. Reduce the heat and whisk in the grated Parmesan until the sauce is creamy and slightly thickened.
Add salt and pepper for seasoning. Use a little of the pasta water you set aside to thin the sauce if it becomes too thick. Take off the heat.
Sauté shrimp:
Heat the olive oil in a skillet over medium-high heat while the sauce simmers. Sauté for 20 to 30 seconds after adding the remaining minced garlic.
Lightly season with salt, pepper and optional red pepper flakes after adding the prawns in a single layer. Cook until barely pink and opaque, 1 to 2 minutes per side. Take off the heat.
Combine: Stir the cooked pasta, Alfredo sauce and prawns together in a big bowl or pasta pot. If you like a looser sauce, add a small amount of the pasta water you set aside. Adjust the seasoning by tasting it.
Assemble the bake: Spoon spaghetti mixture into a 9 x 13-inch (or comparable size) baking dish that has been oiled. Evenly distribute the mozzarella shreds on top, and if desired, add a bit more Parmesan cheese.
Bake: Bake for 15 to 20 minutes, or until the top is brown and bubbling, at 375°F (190°C). Watch carefully and broil for 1 to 2 minutes if you want a browned top.
Finish & serve: Take out of the oven and rest for three to five minutes. Serve hot, garnished with chopped parsley.