Cook the spaghetti in salted water until al dente.
Meanwhile, in a large non-stick pan in 1 tablespoon of olive oil, let the onions become translucent and fry the ham. Add the garlic finely chopped or squeezed.
Whisk the cream with the egg and season with the Italian herbs.
Rinse the finished spaghetti, allow to drain, place in the now higher temperature pan and fry briefly, then stir in the egg-cream mixture and at the end add the cheese and the rest of the olive oil.
Take the pan off the heat, let it steep a little and serve.