Do you have backup? If not, ask your host if they have a backupped version before the hack took place.
What I would do immediately:
Rename your current wordpress installation folder.
Change Database Password, FTP Password and general login credentials @ your webhost front end
Upload the backup.
Do a manual wordpress update (download latest wp release and upload it through ftp, overwrite existing files)
Edit wp-config.php to match your new database password and name
try to login. If this works, use the wordpress export feature to export all your posts and stuff and save the file on your local computer.
Now create a copy / backup of your current database and save it on your desktop computer / and webspace.
Create a new database.
change wp-config.php to use your new database and password.
Change your wordpress user password after that.
Now check if there have been other users added to your wordpress installation (dashboard/users) If so, remove them.
This is a serious topic. You can find more help here:
https://sucuri.net/guides/how-to-clean-hacked-wordpress/
https://www.wordfence.com/docs/how-to-clean-a-hacked-wordpress-site-using-wordfence/
If you don’t feel comfortable dooing these steps on your own, try to get help from someone you can trust.
Wish you all the best