Hi,
I have asp.net core web api using .net core 2.2 version. The problem is when I debug it using IIS express the result is "This site can't be reach" but when i debug it using the project it self it works fine.
Not a big surprise as the port you use on IIS Express can go without a valid server certificate for many reasons,
https://docs.jexusmanager.com/tutorials/https-binding.html#background
That can break any HTTPS based debugging, unless you bind a valid certificate there.
Maybe, you should understand the debug. Also, I disable/remove SSL/HTTPS you don't need it when doing development on your development machine.
https://docs.microsoft.com/en-us/visualstudio/debugger/how-to-enable-debugging-for-aspnet-applications?view=vs-2017