As you said you use .NET 5 (which is NET Core, not .NET Framework), you cannot use My.Computer.Ports
You add the Nuget Package System.IO.Ports 6.0.0
Then you can test :
Dim serialPort As IO.Ports.SerialPort = New IO.Ports.SerialPort()
serialPort.PortName = "COM1"
serialPort.Open()
Dim bOpen = serialPort.IsOpen
Dim nBaudRate = serialPort.BaudRate
Debug.WriteLine(String.Format("Baud Rate : {0}", nBaudRate.ToString()))
' etc...