not sure about the best technique, but these 8 steps that I've written a few months ago can give you a general idea of how it goes...
https://www.blackhatworld.com/seo/impact-of-infrastructure-and-theme-change-on-seo.1701984/post-19092815
Also, I should specify that I've never had to migrate a site that's ranking, and if that's what you're looking for then my steps might be lacking important information.
But for the sites that I've migrated over the years (but which weren't ranking) these steps are the gist of it.
If you're using Wordpress you can use a plugin like Updraft or Duplicator to back the entire site up, then export it, then import it into the new hosting, then re-install and activate it. And I think that if you have the PRO versions of such plugins they will also handle the database creation and 301 redirects too, so there's not much else you need to do, which is cool because you won't accidentally / unknowingly screw things up yourself
Anyway, look up those plugins, read their FAQs and "how it works" section and you'll see that migrating sites is very easy nowadays...