Cut the bacon into pieces and fry it in a pan for a few minutes to color and then remove it.
Chop the onion and cook it in a pan with a little olive oil. Finally, add the cream to warm up and add salt and black pepper to taste. (keep in mind not to season potatoes)
Peel the potatoes and slice it into thin slices (up to 5 mm thick).
Lightly grease the baking tray with olive oil and place half of the potatoes in it. Then pour in half of the onion cream sauce and sprinkle with half of the grated cheese, sprinkle with half bacon. Add the remaining potatoes to the top and pour over the rest of the cream.
Cover with aluminum foil and place in a preheated oven at 200 degrees Celsius for 40 minutes.Then remove the foil and check that the potatoes have already started to soften nicely.
Sprinkle it with the remaining cheese and bacon and put it back in the oven so that the cheese is nicely baked on top and the potatoes are also fully done, which in my case took 20 minutes.Take it out of the oven and serve it hot.