Remove your SIM card and check whether the metal surface is stained. Clean your SIM card using a clean soft cloth and try inserting it again. Insert your SIM card into another phone. If the card still can’t be detected, then this SIM card might have been damaged.
How to clean a simcard?
It depends how dirty your sim is. You can wipe it with a dry cloth or buds. You can blow if it is too dusty. Avoid using soap or wet cleaner.