Meanwhile, cook the spaghetti and whisk the egg yolks with the cream and parmesan, season with salt and pepper well.
Mix the egg mixture quickly with the cooked, drained spaghetti and the crispy diced ham or bacon.
To do this, I put the drained spaghetti (which can still be a bit damp) back into the hot pot and put it back on the switched-off hob. Everything is mixed there until the yolk binds. Do not stir too long, otherwise you will get a scrambled egg. Season well again with salt and pepper.