its a completly different issue as that the OP reported. And we can not help if you not give more detailed info…
@Mariangello , I thought we have existing topics about that kind of issue and so far I member, some users fixed that with reinstalling game-services ( powershell, also see MSFS FAQ ) … I done a quick search in forum and one example result:
https://forums.flightsimulator.com/t/game-doesnt-start-opens-microsoft-store/202716/4?u=michamma