Boil the spaghetti noodles in boiling water.
Finely chop the onion and garlic.
Heat olive oil in a pan and sauté the garlic and onion.
Add bacon and sauté.
Pour in the heavy cream and bring to a boil.
Add the cooked pasta to the pan and mix with the sauce.
Season with salt and pepper.
Finish by sprinkling Parmesan cheese on top.