The LG smartphone can be reset to factory defaults through the settings, which erases all data from the internal memory, including

In addition to the internal memory, the memory card can also be formatted at the same time, but this is an optional feature; if the LG unit has been reset to factory settings, the data cannot be recovered.

Android 9 | LG UX 9.0
Step 1:  Open the  Settings
Step 2:  Tap on  General
Step 3:  Tap on  Restart & reset
Step 4:  Tap on  Factory data reset
Step 5:  Tap on  Reset phone
Step 6:  Enter  PIN / Password / Pattern
Step 7:  Tap on  Delete all
  1. Open the Settings
  2. Tap on General
  3. Tap on Restart & reset
  4. Tap on Factory data reset
  5. Tap on Reset phone
  6. Enter PIN/Password/Pattern
  7. Tap on Delete all

LG Instructions