When custom certificates (self-signed, for example) are used, this means it requires passing certificates to the Node process. This is similar to importing certificates into a Java keystore if you’re familiar.
Ultimately – you will need to pass a .pem file containing your certificates to the NODE_EXTRA_CA_CERTS environment variable. Please read the link just shared to better understand how to use this environment variable to set your custom certificate.
How those certificates reach the build agent is up to you – and the NODE_EXTRA_CA_CERTS environment variable can be set in the Variables tab of an Azure DevOps Pipeline (those variables act as environment variables).