If the quality of the Wi-Fi network is poor, the Samsung device can automatically disable Wi-Fi and use mobile data by enabling the "Switch to mobile data" option in the advanced settings.

If the Samsung device has automatically switched to mobile data, the network quality is checked at regular intervals. In this case, the WLAN menu will display the message "Ready to connect when network quality improves". If this is the case, the Samsung device will automatically reactivate WLAN and connect to the stored network within range.

Android 10 (One UI 2.0)
Step 1:  Open the  Settings
Step 2:  Tap on  Connections
Step 3:  Tap on  Wi-Fi
Step 4:  Open the  menu
Step 5:  Tap on  Advanced
Step 6:  Enable or disable  Switch to mobile data
  1. Open the Settings
  2. Tap on Connections
  3. Tap on Wi-Fi
  4. Open the menu
  5. Tap on Advanced
  6. Enable or disable Switch to mobile data

Samsung Instructions