- Unlock bootloader (depending on vendor, you have to do an online verification),
- flash a recovery.img,
- load into recovery mode (which, depending on the phone, might need extra work)
- wipe some caches,
- select new os/rom image,
- pray it doesn’t brick your phone.
You’d think someone would’ve learned a thing or two from the easy graphical installations linux and even windows have been offering since the late 2000s.
For many reasonable vendors, this process is very unlikely to brick your phone, and requires minimal effort to unlock the bootloader or load/change the recovery.
However, many phone vendors (Xiaomi was the one example I know) subsidize phone price with data surveillance and ads; so they don’t want users to use other OS, as it hurts their revenue.