I am in search of az commands (powershell) to add urls in azure app service while deploying
You can refer the attached image for clarity
.

Thanks in advance
On
2023 Update
If you are coming to this answer now, it looks like the settings are now under siteConfig not config. Here's a Powershell snippet that will set some cors values and set cors to support credential passing:
$ResourceGroupName = 'my-resource-group'
$AppName = 'myWebServiceApp'
$AllowedCorsHosts = @("https://somedomain.com","https://some.otherdomain.com")
$AzResourceParams = @{
ResourceGroupName = $ResourceGroupName
ResourceName = $AppName
ResourceType = "Microsoft.Web/sites"
}
$WebAppResource = Get-AzResource @AzResourceParams
$WebAppResource.Properties.siteConfig.cors = @{
allowedOrigins = $AllowedCorsHosts
supportCredentials = $true
}
$WebAppResource | Set-AzResource -Force
Please use Set-AzResource.
An example for your reference.