I have two answers, a selfish answer and a strategic answer.
My selfish answer is make games that I have been wanting and no one else is making. A good example is what Nintendo did with Breath of the Wild. I was very disappointed with the Zelda series for about 25 years, and I would have gone to any system that gave me that old school Zelda feel. Appropriately, Nintendo was the one to get Zelda back to it's roots. But now Zelda is off the table for Microsoft, because Nintendo did it first. I had been wanting a game like Spider-Man 2 also, and Sony did that. Now that type of game is off the table.
However, two franchises that have left a hole are Final Fantasy and Final Fantasy Tactics. They should hire some devs passionate about these franchises and give them a significant budget and let them make a game of a similar feel. They don't even need the franchise name, they just need to make it clear that the game "feels" like these franchises. I am really enjoying Wargroove right now, because Advance Wars hasn't been made in a long while. It looks enough like Advance Wars that it doesn't need the name. Really Microsoft could even hire Sakaguchi and Uematsu and give them like a $20m budget and see what they make. Even if they the first game only sells a couple of million they should stick with making these kinds of games, because they might have to iterate until they get a major hit. That is basically what Nintendo is doing with the Xenoblade Chronicles series. They are trying to get old Final Fantasy fans. Microsoft should try to beat them to the punch.
Now my strategic answer. Microsoft's ultimate goal is to build up and defend the PC platform as much as possible. They released the Xbox series of consoles to prevent the Playstation from becoming a PC in the living room. They are releasing Gamepass and XCloud to defend from companies like Apple and Google from entering gaming. Their console strategy is part of their larger PC strategy.
What Microsoft needs to do is to actually become the PC in the living room. They need to bundle a stripped down version of Windows in every Xbox, and think of consoles as a third way for people to experience Windows. This should not be an "in your face" thing though. Instead it should have a traditional XBox interface with an option to go to Windows. (Also the console needs to look like a console and not a PC tower.) Then they need to partner with one or more PC gaming platforms like Steam, Epic and/or GOG. (I'll just use GOG from now on to keep it simple.)
Then, they need to have "one-way" exclusive games. For example, if a person wants Halo, then they need to own an XBox and buy it for XBox. However once they own it, then they can also play it on the PC platform of their choice (GOG, Steam, etc...). They can then play the game on XBox or PC, but they can only buy it if they own an XBox. Also a person can get to their PC platform of choice from XBox in the living room. This basically turns every XBox into a Steambox or GOG-box too. Also it should be very easy to use either a normal controller or PC & mouse from XBox and encourage all third party games to have both control options. Basically this would mean XBox players would have all XBox games with the option of having all PC games too including their whole PC game library.
Other things Microsoft needs to do:
1. Win back North America. To do this they need to make Halo and Gears revolutionary and amazing games. They need to make a Halo game so good that FPS fans say, "Why am I even playing Call of Duty anymore?"
2. Focus on expanding into Eastern Europe. That is what Sony is doing right now. Cut Sony off at the knees. If they partner with GOG and CD project Red they should be able to do it.
3. Also expand into India. Everyone focuses on China. Why? India has over a billion people, isn't Communist, English is their official language and their only real taste of gaming is PC gaming. It's a perfect territory for Microsoft.
4. Make a Banjo Kazooie game. Nintendo is giving them free advertising, so that is money left on the table if they don't do it. And while they're at it, try to get Master Chief in Smash Bros.
5. Get an exclusivity deal on Witcher 4 from CD projekt Red. Also, hire the Sonic Mania guys to make an exclusive 2D platformer.
6. Put as many Apple Arcade games on Gamepass/Xcloud as possible. If these games stay Apple exclusive, they give Apple an opportunity to grow. They need to nip that in the bud.
7. Make the system backward compatible all the way back to the O.G. XBox. Rerelease popular old games like Master Chief Collection and Knights of the Old Republic. Then if they buy then on XBox make then available for free on their PC platform of choice (Steam, etc...).
8. Most importantly, make their system slightly less powerful than PS5 and $50-$100 cheaper. It will run all of the same third party games but it will be a cheaper system. Chasing the title of "most powerful system" is like chasing a white whale. Far more people care about price than power.
And really, they would be smart to take both of my strategies into account. Make games that other companies have neglected, and bring the PC into the living room. There are actually a lot of opportunities for Microsoft to both win customers and grow the PC platform if they know how to take advantage of them.