It is application-specific decision, there is no universal or close-to-universal answer. Every application implements its own logic on how to filter the most suitable certificate and vary from application to application.
Speaking to Microsoft SQL (as I guess from cert's friendly name), then it uses the certificate which is explicitly assigned to service via SSCM (SQL Server Configuration Management): https://learn.microsoft.com/en-us/sql/database-engine/configure-windows/manage-certificates?view=sql-server-ver15
you have to explicitly assign it there, otherwise SQL will use a built-in self-signed certificate and will ignore what you have installed in certificate store.