There are two options we can go for:
OPTION 1
Step 1: You need to create a Huawei Developer Account.
Step 2: Create a project in console using your project name and package name
Step 3: In console enable the services needed in your application to run.
Step 4: Declare your project SHA256 signing certificate fingerprint in the console.
Step 5: Download the agconnect-service.json file from the console.
Step 6: Write code for HMS by keeping GMS code also. Check out the below link on how to keep both GMS and HMS in same project:
https://forums.developer.huawei.com/forumPortal/en/topic/0201308778868370129
OPTION 2
Use HMS Toolkit to quickly migrate the app to HMS Core to release it on HUAWEI AppGallery.