If you root your phone you can go both ways and give your security a good night kiss.
It is important what kind of phone it is as well. Android devices are a wild world where you can stop getting any updates last week. Also, being able to unlock bootoader does not mean you will get the ability to install any rom you want. Usually this only counts for more expensive devices. Otherwise you might be lucky to get a rom maintained by one guy from India who is taking care of 5 other roms.
deleted by creator
If you root a phone then you can remove alot of insecurities and also if you unlock the bootloader you can install something more secure like calyxOS
If you root your phone you can go both ways and give your security a good night kiss. It is important what kind of phone it is as well. Android devices are a wild world where you can stop getting any updates last week. Also, being able to unlock bootoader does not mean you will get the ability to install any rom you want. Usually this only counts for more expensive devices. Otherwise you might be lucky to get a rom maintained by one guy from India who is taking care of 5 other roms.