The easy answer to that question is that you can only lock the bootloader after /e/OS install if it is specifically explained in the install instructions ! So in this case don’t do it.
Is more complex but is it enough to say that for most devices the /e/OS ROM has not been built to allow re-locking.
This search of the forum https://community.e.foundation/search?expanded=true&q=Re%20lock%20bootloader gives > 50 results, some more complex than others. One key phrase in further research is Verified boot.
There is also this reference page: