Solution
Go to your play console > Setup > App Signing
Copy SHA-1 certificate fingerprint and SHA-256 certificate fingerprint
Now head over to firebase console > project settings > General > Scrool down you will see (Add Fingerprint) now add both the fingerprints you copied
after adding the fingerprints download the googleservices.json file and replace it with the file in your app