is it on Sprint and doing this or is it on another carrier? and which phone is this? does it stay locked to roaming or are there areas that its able to pull a regular signal just fine?
yeah you need an agent for this one. to me that sounds like more than just a sim card issue. the sim card only allows you to connect to whomevers LTE whether it be sprints or another carriers. doesnt have much affect on the calling side of things..which is also what you are running into.
regular texts and calls incoming and outgoing work or do not work when this happens?
How do you unlock the phone? Like with your face or eyes? What happens is when folks have a facial lock on and try to unlock, it fails quite often. After a lot of failures, it locks the SIM. I would suggest to change it to fingerprint or PIN lock if this is the case. If not, then the SIM would need to be replaced.
how do I fix the invalid SIM card error that keeps locking me out of my telephone
If able, I suggest requesting a replacement SIM card. I had similar issue, but it was with an iPhone 6s, where it periodically give SIM card error. Eventually, no matter what was done, restart or network reset, etc. it still shows error. I took it into the Sprint store and asked to try a different SIM card before going further with diagnosis of potential other issues. The new SIM card was the answer, as the phone is working fine for months now.