First, take a deep breath and don’t panic. It’s not the end of the world and you are not the only one with a hacked WordPress website.
Certainly, the easiest way is to recover the website from an earlier backup. Just restore an older backup from a time where your website was not hacked. Change all passwords, use 2-factor authentification and your problem is history.
If you don’t have a backup, here’s how to deal with the problem step by step.