When you are ready to publish your Android Application, you need to sign your app and upload it to an app store, such as Google Play. Following procedure describes how you can generate the upload key and keystore as required for signing your application for releasing app to google play.
Note: You will have to save this key since once app is published to Google Play and if you lost the key, you will not be able to update the same app again.
Start Android Studio and Open your application project in android studio, then In the menu bar, click Build > Generate Signed Bundle/APK
In the Generate Signed Bundle or APK dialog, select Android App Bundle or APK and click Next
Below the field for Key store path, click Create new.
On the New Key Store window, provide the information as requested, please make sure to note down / remember the passwords used here.
Once you complete the form, click OK
Once you click OK, you should see the keystore file getting generated at the directory location as you mentioned in form above. Make sure to save this file somewhere as mentioned above as required for future app uploads to play store.
Reference – https://developer.android.com/studio/publish/app-signing#generate-key