How do I use Google Authenticator on a new phone?

Back then, I would use Google Authenticator on my iPhone to get the 2FA pins for apps and services such as Snapchat login.

Recently I have switched to a new Samsung Galaxy S8 and have installed Google Authenticator on it.

However, when I open the app, I do not have all of the accounts that I synced before and therefore I can't login to those apps or services like Snapchat that require that 2FA pin.

How am I supposed to get back all of my codes to work on my Samsung Galaxy S8 just as it did before on my iPhone?

Google Authenticator doesn't sync the 2FA information. You will probably have to log-in with a different method, e.g. Using a code you'll get over text instead of the 2FA app and then disable and re-enable 2FA in the service's settings. Mostly every service also provides an option to reset your 2FA settings if you lost your phone/switched to a new one. I recommend that you use Authy next time, a product similar to Google Authenticator, but it also supports syncing with other devices.