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
Factory reset -  Open the  Settings
Factory reset -  Tap on  General
Factory reset -  Tap on  Restart & reset
Factory reset -  Tap on  Factory data reset
Factory reset -  Tap on  Reset phone
Factory reset -  Enter  PIN / Password / Pattern
Factory reset -  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