After going out of the krita tab ( I didn't close it just went to a different tab) I came back and all of my layers were merged onto "root merged". This is a big problem
Sounds like you accidentally triggered Flatten Image, the default shortcut for it is Ctrl+Shift+E. It can be undone (Ctrl+Z).