Only a portion of devices powered by Android has feature that bootloader can not be unlocked - to clear ambiguity and be precise - unlocking method has not been found.
Bootloader lock and carrier lock are two completely different things. With bootloader lock, OEM vendors force regular users to use only their - stock - ROM. But, with carrier lock, network operators force same users to use only their cellular network infrastructure. In both cases, those locks can be removed.
Bootloader can be unlocked, even if seller factory reset device && relocked bootloader before sell.
If not acknowledged by seller, you as a buyer can not know whether device bootloader is (re)locked or not. Also, if model is same, it can not exist in
exist in bootloader unlockable versions and manufacturer bootloader unlock disabled versions
it is simply a matter of applying correct procedure to unlock bootloader of particular model.
Most valuable resources about possibility to unlock bootloader and install custom ROM is devices' wiki on LineageOS and list of TWRP custom recovery images.
There are device projects that are done by community side or unpublished at all, but, in that particular case, consult Google.