I don't understand still between lock and relock
As explained above by @V0latyle
default state of device is locked. If you want you can unlock it. But once you unlock and flash custom binary you can never lock again as same state before you unlocked. You can relock bootloader with missing some features forever. Nothing can help to restore said functions.
To expand on this: Samsung uses Knox Guard and other features to detect whether custom images have been flashed to the device. If this is true, some apps and functions that depend on Knox status may not work.
This is in contrast to other OEMs such as Google - the Pixel series can be restored to factory stock with a locked bootloader, and there will be no trace of the device ever having been modified.
What you can
do, on either stock or custom firmware, as long as you're rooted with Magisk, is use Magisk modules such as Universal SafetyNet Fix to spoof device responses to Play Integrity attestation, as well as "hide" Knox status. However, again, this requires root. Magisk modules cannot be used without Magisk root.
To try to explain this simply:
- Stock firmware, never unlocked: Knox OK: secure functions will work.
- Stock firmware, locked but previously unlocked, custom firmware never installed including Magisk patch and/or recovery, Knox should be OK.
- Stock firmware, locked but previously unlocked with custom firmware, Knox tripped: secure functions will not work.
- Stock/custom firmware, unlocked, rooted with Magisk, attestation responses fixed via Magisk module: Knox status should not matter, Android/Google secure functions should work but Samsung apps that depend on Knox may not.
It is not possible to reset Knox status once tripped.
Therefore, if the device has ever been modified, even if it's just a Magisk patch, re-locking the bootloader will not return it to the "pure" factory state. So, if you are wondering whether to unlock the bootloader, understand that once anything is modified, you are committed and there is no way back. If you don't intend on modifying anything, don't unlock.