Based on your description, this issue seems to be ***hardware-related***, especially since it coincided with battery swelling. Here are a few things to consider and possible fixes:[br]
Antenna or Signal Amplifier Damage
Baseband Chip Issue
SIM Tray Contact Issue[br]
***Possible Fixes***
# ***Reseat the SIM Card***
** Remove the SIM, clean the contacts, and reinsert. Also, try a different SIM to rule out compatibility issues.
# ***Check Internal Antenna Connections***
** If you're comfortable opening the device, inspect the ***antenna cables near the logic board*** for any looseness or damage.
# ***Restore or Reinstall iOS***
** If hardware checks don’t help, try ***restoring iOS via iTunes***. If the baseband firmware is missing (check under ''Settings > About''), this may indicate a hardware failure.
# ***Replace the Signal Antenna***
** If opening the device, consider ***replacing the antenna flex cable***—especially if the issue started after battery swelling.
# ***Inspect the Baseband IC***
** If all else fails and the problem persists, the baseband chip might need ***reballing or replacement*** (requires micro-soldering).