Hey ccarrieta171!
This could be a few different things. The iPhone 7 has had a few reports of defective antennas, however there are some troubleshooting steps may resolve the issue if it's not hardware related. Try running through the steps here to see if its software related first: If you can't connect to a cellular network or cellular data - Apple Support
If the above steps don't help resolve the issue but you have an old/spare iPhone available, you can try removing that SIM card and transferring it to the old device. If the old device connects to the cell network, that confirms a hardware on the iPhone 7. See an Authorized Apple Retailer for assistance or possible replacement (this service should be covered by warrantee based on personal experience!).
Note: Below are some advanced user steps. If you are uncomfortable trying them out, visit a Genius Bar for help!
To swap the SIM card, get an object like a paper clip. Holding your iPhone 7, turn it so you are looking at the right side (wake/sleep button facing you). Locate the small circle and push the paperclip with moderate force to remove the SIM card holder. Carefully remove the SIM chip inside. Repeat these steps with the other iPhone and place the SIM chip into the holder, and then the phone. The device should connect without restarting the device.
If you suspect a hardware issue, set up an appointment through the Apple Store or Authorized Apple Service Provider: https://getsupport.apple.com/