If you are using private nuget server. You will need to create self-hosted agent on your local machines that have access to the private nuget server. And select your private agent pool to run your Azure pipeline on the self hosted agents.
For your private nuget server is unavailable to the cloud hosted agents. If you run your pipeline on the cloud hosted agents, the nuget restore step in your pipeline will fail to find your package.
If you are working behind a proxy. Please check below document to configure the proxy settings for the self-hosted agents.
Run a self-hosted agent behind a web proxy