Hi @pezt,
Can you try swapping the SIM card with another known working SIM card to see if:
a) your SIM works in another phone - make sure that the other phone is compatible with the SIM network before you try
b) That the other SIM card works in your phone or not.
''If it still doesn't work'', try starting the phone in [https://support.t-mobile.com/docs/DOC-30563|safe mode] and check if it now works OK. If it does then a ''downloaded'' app is the cause of the problem. The trick is to find out which one.
''If it still doesn't work in safe mode'' follow the directions in the Chosen solution above and perform a [https://www.hardreset.info/devices/samsung/samsung-g531f-galaxy-grand-prime-ve/hardreset/first-method/|hard reset] and then check if it works OK.
''If it still doesn’t work'' when in default factory mode, then you have a hardware problem, perhaps a faulty SIM card reader.