Transfer the onion and garlic mixture to the crockpot. Add the crushed tomatoes, tomato sauce, basil, oregano, sugar, and red pepper flakes (if using). Stir to combine.
Season with salt and pepper to taste. Adjust the seasoning as needed.
If using meat, brown the ground beef or sausage in the skillet, then add it to the crockpot. Stir well to incorporate the meat into the sauce.
Cover the crockpot and cook on low for 6-8 hours, allowing the flavors to meld and develop.
Once done, taste and adjust the seasoning if necessary. Serve the sauce over pasta, layer it in lasagna, or use as a dipping sauce for breadsticks.
Notes
If you prefer a thicker sauce, cook uncovered for the last hour to reduce the liquid. The sauce can also be frozen for up to 3 months.