How to get the TCP / IP Settings of a SQL Server?
This query gets tcp/ip settings of the SQL Server from registry.
An another way to check is from SQL Server configuration manager.
You can find the SQL Server configuration manager from the below path. The file name will be different based on which version of SQL Server.
C:\Windows\SysWOW64\SQLServerManager15.msc
Right click and open the properties to check the settings.