RE: How to import license file in form of XML from ISV
You need to deploy it with your deployable package. Inside the deployable package, you will find folder \AOSService\Scripts. Create a new folder called License in the Scripts folder and put the license there.
Basically you could put it in the same deployable package that contains the ISV solution.
But nowadays you always need to deploy an All-In-One deployable package which needs to come from your build pipeline and contain all your custom and ISV packages.
So, you need to deploy it together with your code deployment.
If it's a dev system, you can also import it from command line:
K:\AOSService\PackagesLocalDirectory\Bin\Microsoft.Dynamics.AX.Deployment.Setup.exe --setupmode importlicensefile --metadatadir K:\AOSService\PackagesLocalDirectory --bindir K:\AOSService\PackagesLocalDirectory --sqlserver . --sqldatabase AxDB --sqluser axdbadmin --sqlpwd [password for axdbadmin] --licensefilename c:\temp\[license file name].txt