Ok so I've been having this problem on my Xbox One S for about 3 years now; It's been constantly needing a factory reset (I keep my games and apps) because Xbox.
I have grown to hate this and I have been trying to get help with this for months, only for people to say that I desperately need to upgrade. (Which I am trying to save up for)
I especially hate it when I was playing a game I'm trying to play right now, and then the Xbox says it needs a Factory Reset.