On my Lumia 640 XL, I earlier faced issue for sim card detection. I visited service center and got it resolved, it worked fine for ~6 months.
Now I am again facing same issue, I tried Hard reset as well, but did not helped.
Any help is appreciated.
Remove the sim, clean the contacts and then put it back and check. SIM card issues aren't usually solved with hard resets - so try the replacement again - I can't imagine that getting a replacement is such a hassle?