My iPhone X is messed up?

So pretty much I was logged out of my Amazon account, my Instagram account and Google and iCloud . Is there any fix for this so that it doesn't happen again and what caused it ?
3 answers 3