Bring a large pot of salted water to a boil. Add the spaghetti and cook until just al dente, about 8 minutes. Reserve a cup of pasta water, then drain the pasta and set aside.
In a large skillet, melt the butter over medium heat. Add minced garlic and cook until fragrant, about 30 seconds, filling your kitchen with a warm, savory aroma.
Stir in the tomato sauce and a splash of the reserved pasta water. Add red pepper flakes, then simmer gently until the sauce slightly thickens and becomes glossy, about 5 minutes.
Add the cooked pasta to the sauce, tossing to coat each strand evenly. Let the pasta absorb the flavors for a minute, until the sauce clings nicely.
Using a spoon or small ladle, place small dollops of ricotta or mozzarella on top of the pasta to resemble web or face features.
Take a toothpick or skewer and carefully drag the cheese into web-like patterns or face shapes, creating a spooky, webbed effect.
Sprinkle chopped basil or parsley over the dish for a fresh, green contrast, and to brighten the overall look.
Serve immediately while hot, with extra sauce on the side if desired, to enjoy the fun, whimsical Halloween pasta.