It’s imho even easier (if you have a “fastboot” command on your device - if not you might use your preferred search engine to find out how to install it).
Just
- shutdown your FP4
- keep “vol-” pressed while connecting the device via an USB data cable to your computer
- type
fastboot flashing lock
If you want to make sure you won’t brick your device then you can type in
fastboot flashing get_unlock_ability
before relocking the bootloader.
If the answer is 1, it should be possible to relock the bootloader.
If the answer is 0, you should not relock the bootloader.
Please be aware that relocking the bootloader will factory reset your device (i.e. it will delete all data on it!)