I'm trying to connect to MS Dynamics 365 CRM with SQL Server Management Studio. After lots of researching I can't find any solution that how can I connect database.
You can connect to Dynamics365 (at least when it's "in the cloud") using SSMS following this recipe here:
https://markcarrington.dev/2020/05/13/cds-t-sql-endpoint-pt-1-connecting/
Basically, you need to explicitly enable the TDS endpoint in the Power Platform admin area and then use yourcrm.crm.dynamics.com,5558
as the server/instance name, and some Azure Active Directory authentication scheme to connect.