I accidentally deleted the category. Is it possible to bring back the messages again?
No hosting backup.
when you delete a category, it asks if you want to move the messages to another category, if so, you could recreate category and move the messages back to the category you want.
otherwise, you will need to restore your forum from a backup of your database. If you didn't make your own backups, you will need to ask your host if they have any backups of your database prior to your deletion of the content. if host has no backup of database and you have no personal backup of the database, there is no way to bring back the content of discussions or anything about them.
essentially, any code changes or files you created or modified, uploads folder, config.php, locale.php if any, and use phpmyadmin or a mysqldump to make a backup of database.
one of many tutorials
also, now is a good time to upgrade to vanilla 2.3, since vanilla 2.2 is no longer supported.
Pragmatism is all I have to offer. Avoiding the sidelines and providing centerline pro-tips.