This can be the case if you're using an old phone.
It may also be as a result of dirt or dust accumulating in your SIM slot. If that chip gets dirty (typically with oil from your fingers), it can affect the way your iPhone reads the data and communicates with it.
That little metal chip that takes up most of the backside of your SIM card is the part that's responsible for its functionality.