Hello,
Make sure that the SQL Server instance hosting the local database is configured to allow remote connections. You can check this in SQL Server Management Studio (SSMS) by right-clicking on the SQL Server instance, selecting "Properties," then going to the "Connections" section and ensuring "Allow remote connections to this server" is checked.
Also plaese confirm that the SQL Server instance is listening on port 1433 or another specified port. You can find this information in the SQL Server Configuration Manager under "SQL Server Network Configuration" > "Protocols for [instance name]" > "TCP/IP" > "IP Addresses" tab. Make sure the "TCP Dynamic Ports" field is empty and the "TCP Port" field is set to 1433 or another specified port.
If this answer helped please mark it as accepted to help others find this topic.
Regards