Hi Yat,
The rinexread function supports both RINEX Navigation Message and Observation Data files. You'll need a RINEX Navigation Message file to get the satellite orbit parameters to supply to the gnssconstellation function.
From your attached code and error message, it looks like line 528:
filename = "COM3-20240120(1).obs";
is an Observation Data file.
Thanks,
Ryan