Hi @rizu6 ,
Try swapping the SIM card from your phone with a known working network compatible SIM card from another phone and check if yours works OK in the other phone and if the other SIM card works OK in your phone without problems.
Doing this will eliminate or confirm if the SIM card is the problem. Hopefully it shouldn't take to long to show up one way or the other.
If the other SIM also shows the same problems in your phone then the problem may be with the SIM card reader in your phone. It may not be exerting enough tension on the SIM card to ensure a good connection
Here is a link to the ifixit 三星Galaxy S7拆解 guide.
It is useful as it shows how to dis-assemble the phone so that access to the reader is possible.
As it is a SMD (surface mounted device) component, you'll need SMD soldering skills and tools to effect the replacement of the part.
If this seems all to daunting, contact a reputable, professional mobile phone repair service and ask for a quote to repair the phone.