Are you sure you want to install it for "VPN & App User"? In particular, I was trying to install the certificate from Burp proxy and was misled by the instructions that said
In some versions of Android, your device will ask if you want to use the certificate for "VPN and apps" or "WiFi".In the "Credential use:" options, you should select "VPN and apps".
In my case with Android 12, there was a 3rd option, "CA certificate". But I tried a few times with "VPN & app user certificate" and it failed, with the same error message you saw. Then I tried "CA certificate", and it worked.
To be fair, the title of the instructions was "Installing Burp's CA Certificate in an Android Device", which gives a clue that it should be CA Certificate, even though it says to select "VPN and apps".