Or you can change the nuget source to https://www.nuget.org/api/v2/ in Visual Studio options.
and In the Nuget Package Manger change the Package source the new source
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Visual Studio2022: Nuget package manager is giving error:
Unable to load the service index for source https://api.nuget.org/v3/index.json.
Or you can change the nuget source to https://www.nuget.org/api/v2/ in Visual Studio options.
and In the Nuget Package Manger change the Package source the new source
As per the following blog post Nuget v3 API is down but it will be available soon so for now it's suggesting same solution of going back to v2 temporarily.
I can confirm this issue is due to the API Blocked in your country. I used the desktop vpn and I was able to connect to nuget.