See here:
I’ve checked the simplest of them and it works:
"The solution lies in creating a new key when generating the signed apk. this worked for me without a fuss.
- click on Build
- click generate signed Bundle/APK…
- choose either Bundle / APK (in my case APK) and click Next
- click on create new (make sure you have a keystore path on the machine)
- after everything, click finish to generate your signed apk
when you install, the warning will not come."
To do this, see e.g. here: