There are a few circumstances under which you may come across this error :
We’re having a problem opening this location in File Explorer. Add this web site to your Trusted Sites list and try again
Here I will provide a solution for one of those – You are trying to open a SharePoint document library in explorer view while on the SharePoint server.
There is an excellent post here that provides a detailed description of the problem and solution, but to summarise, you need to install the Desktop Experience feature under User Interfaces and Infrastructure on the server.