I lost cell connection, “invalid card” error, can I replace it with a Sprint sim card from Best Buy?
No, the only SIM that will work in your phone is the one from Republic Wireless. There was a problem with a Facebook update that caused symptoms similar to what you are experiencing. The solution is to uninstall Facebook, restart the phone, and then reinstall Facebook. Facebook is so problematic some have chosen to not install it in favor of accessing Facebook with Chrome.
Let us know if this doesn’t solve your problem.
The SIM in your Moto X2 is specifically linked to that phone. A Sprint SIM acquired from Best Buy will not work. Are you experiencing any other symptoms? Is your phone freezing as well as presenting SIM card errors?
If not, I suggest starting with reseating the SIM. Here’s how from Motorola: How to insert or remove SIM card - Moto X 2nd Generation.
In addition to what @billg and @rolandh have offered I would add that the Moto X2 does not need a SIM at all in order to make phone calls over cell or Wi-Fi. So the “invalid card” error message has nothing to do with your loss of cell service.
I would suggest standard troubleshooting and forget about the SIM card for now.
If you are still getting the “invalid card” error after you get your cell service working again then it would be time to spend time and energy on it. For now it’s not going to help you to focus on the SIM.