Which version of SSMS are you using? It may help to check the option "Trust server certificate" as in the example below. (But I believe that there are more possible reasons for this error, so it may not help.)
If you are using an older version of SSMS, you find this checkbox on the Connection Properties tab.