Add the minced garlic and cook for 1 minute until fragrant. If using ground beef or sausage, add it now, breaking it up with a spoon, and cook until browned, about 5-7 minutes. Drain excess fat if needed.
Stir in the crushed tomatoes, water or broth, oregano, basil, red pepper flakes (if using), salt, and black pepper. Bring the mixture to a simmer.
Break the spaghetti in half (optional, for easier stirring) and add it to the pot. Stir to submerge the pasta in the liquid. Cover and cook for 10-12 minutes, stirring occasionally, until the spaghetti is al dente and the sauce has thickened. Add more water (1/4 cup at a time) if the pasta starts to stick or the sauce gets too thick.
Once the pasta is cooked, taste and adjust seasoning with additional salt and pepper if needed. Remove from heat.
Serve hot, garnished with grated Parmesan cheese and chopped fresh parsley if desired. Enjoy your one-pot spaghetti straight from the pot!