Boil the spaghetti noodles.
Finely chop the onion and garlic.
Sauté the chopped onion and garlic in olive oil in a pan.
Add ground beef or chicken and cook until done.
Pour in the tomato sauce and bring to a simmer.
Mix the cooked pasta with the sauce.
Transfer to an oven-safe dish and top with cheese.
Bake in a preheated oven at 200°C for 10–15 minutes.