The easiest way to transfer your hosting files is to locate a hosting company that does that free for you. I think Namecheap does that within the 24hours of purchasing your hosting. If you already have a hosting account, and it's a WordPress website. Check if your Cpanel has managed WordPress. There's an option to transfer your hosting from another company. This feature is very easy to use. Else, do the following:
- Use FileZilla to download all your files in the previous hosting, including the database
- Use FileZilla to upload all the files downloaded to the present hosting
- Create a database in the new hosting with the database credentials of the previous hosting
- Upload the downloaded database to the new hosting platform using PHPmyAdmin
- If your new database was created with different credentials, then change them in wp-config.php
- Change your nameservers to reflect the current nameservers in your domain registrar's dashboard.
For detailed info, check the material from Hostinger on how to transfer hosting.