In this post I will show you how to solve above problem. To solve this problem there are multiple ways in VS Code. some of them are...
Before that previously I had shown you
To solve this problem I had generated certificates as described in the error message as shown below.
To generate a developer certificate run 'dotnet dev-certs https'.
To trust the certificate (Windows and macOS only) run 'dotnet dev-certs https --trust'.
But no use.