Try first to optimize the range of the mobile network, see this Apple article:
If you see No Service or Searching on your iPhone or iPad
If you see No Service or Searching on your iPhone or iPad - Apple Support
You need to assign the iPhone 12 a MAC & a private IP address.
Log in to the router, add your iPhone NAME + iPhone MACÂ + private IP address.
Â
Your iPhone MAC address is: go to Settings -> General -> About -> the Wi-Fi address (note this address).
Assign a private IP address to the iPhone, for example 192.168.x.xxx or 169.254.x.xxx.Â
This depends on the router & other iDevices that have already been added.
What is important, check the list and the last xxx must be different from the iDevices that have already been added.
See this Apple article: If you need help with your Wi‑Fi password
If you need help with your Wi‑Fi password - Apple Support