I hope you are doing well.
Once you restore your information especially text you will need to go to setting > accounts> and add your google and Samsung account. Once those accounts are entered then try going back into setting > account and back up > restore.
I hope I was able to help you answer your question.
The only way to properly answer this question other than the information which the other Expert gave would to know which method you used to backup your messages or anything else. If you factory reset your phone and now you are restoring it then it prompts you through the setup process to enter your creditials to restore from a back up. If you did not reset the phone and just logged out of your accounts then logging back in
in settings... accounts... back up and restore... restore
Settings Accounts Samsung Cloud Restore data Restore with check mark on desired info
Hope this helps