Once upon a time, if you wanted to sell your old phone, all you needed to do was to flash it, and all your personal info would be erased.
Not anymore. Now there is free online software that people could use to scan the phone and extract info from a flashed phone.
Luckily, there is something you can do yourself in the settings area of your phone to keep any personal info even from people that can recover flashed info before you sell that phone.
To learn the technique, click the link below.
https://burstscam.com/blog/2020/01/09/before-you-sell-that-phone-or-give-it-out-a-must-read/
Link not accessible
I wish I was able to learn from it.