Will a Factory Reset Delete My Microsoft 365 Data?

After performing a factory reset on my phone to remove a virus, I'm having an issue with a subscription. The app is not recognizing my existing subscription and is asking me to make a new payment. Does anyone know how to resolve this?