The Get-CimInstance
command for querying the Security Center namespace is specific to consumer versions of Windows and generally isn't applicable to server versions like Windows Server 2019. However, you can still gather information about antivirus products on Windows Server 2019 by querying the WMI
Something like this might work:
Get-WmiObject -Namespace "root\SecurityCenter2" -Query "SELECT * FROM AntivirusProduct"