According to this article, you can check in the settings to see if it is expecting a expecting a SIM card.
Discrepancies within the phone's settings can also be the cause of SIM card errors on Android smartphones. Specifically, whether a phone is set to use an eSIM or physical SIM can cause the 'SIM 1 Not Allowed' error. If the phone is expecting to use an eSIM, which does not require a physical SIM card, it will reject any physical SIM card installed in the first SIM card slot. To check this, open the settings app and navigate to the cellular settings. Here, users will be able to see whether the phone is set up to use an eSIM or physical SIM, and whether it is installed properly. If it is set up for an eSIM, simply change the setting to recognize the physical SIM card. In some cases, this might require contacting the cellular carrier.
If that's not it, I would say taking it back to where you got it might be your best bet.