Microsoft has the last few years changed the defaults for encryption when connecting. Previously, the default as "Optional", now it is "Mandatory". These changes are in the driver; not in SQL Server.
The proper solution is to install a certificate on SQL Server, and this certificate should be in the Trusted Certificate store on the client. However, this is a quite an overkill for a connection on the local machine. In this case you can use TrustServerCertificate=true
in the connection string. But this option is not appropriate in a corporate network when you work with sensitive data, as this permits a network admin to install a proxy that presents itself as SQL Server, but steals the data. A so-called man-in-the-middle attack.
If you are connecting from SSMS, the option to trust the server certificate is on the front screen in SSMS 20.