I unlock the bootloader and install a custom rom (pretty much exclusively LineageOS nowadays, I’d try GrapheneOS, but I’d have to spend far more on the phone than I’m willing to get that). That is everything cleaned ;) I only buy phones with LineageOS support.