Change app ID

I have made two different apps and when I put it on the phone, one replaces the other.
I guess problem of appID.
I change it in the AndroidManifest.xml file but always just put the old ID back.
How to change it definitely?
Or how to change it in ionic before build android?

before creating android, it is necessary to change the app ID in the capacitor.config.json file that generates the androidManifest file correctly