If you want to play Genshin Impact, then you will need to make an account, and there are 2 ways to do this.
1. Genshin Impact's Official Website
You can either go to Genshin Impact's Official website, then click on "log in" and register a new account using your e-mail, or simply log in with your Facebook or Twitter account.
2. miHoYo's website
The other way to do it is to make it by using miHoYo's website. Making an account here is the same as if you made an account on the Genshin Impact website since miHoYo account is used for all miHoYo games.
Why make an account?
Making an account lets you save your progress and can also be used to play other miHoYo games, like Honkai Impact 3. If you are playing without an account and then lose your phone, or delete the app, you will end up losing your account. Binding your save data to an account lets you transfer to a different device easily.
Linking your account
For increased account security, it is advised to link your account to your other social media accounts. You can do this from in-game, or through the website. You will need to have a MiHoYo account first before being able to link them.
Through the game
Start by going to the main menu in-game, and select the gear icon on the left side of the screen.
Select the "account" section and tap on the "click to proceed" on the User Center.
Scroll all the way down and select the "Linked Accounts". This section is also where you can link to your mobile phone number. However, as of writing this guide, there is no 2 Factor Authentication yet.
There are 5 available options for you to link your account to: Google, Facebook, Twitter, Apple, and Game Center.