prisi "what do you mean by always accessing fastboot?"
Fastboot is the bootloader interface, you have to access it to flash GOS (you access it during the step where you turn off your device then press and hold the power and volume down button)
"and locking the bootloader before everything is finished", no, because OEM unlocking is still enabled. So you can always run fastboot unlock. If OEM unlocking became disabled, then yes there would be issues.
"or closing/restarting phone when installation is happening?", this would mess up the flash but you can still restart it. However it would have to restart the flashing process
"or you meant that even if something's wrong, fastboot will always allow me to restart and boot to get back to the same step i was at?", if something goes wrong (lets say your cable disconnects mid flash somehow) then while your phone will not boot it can still enter fastboot for a reflash
The process of locking/unlocking the bootloader only does two things really: toggles the ability to flash the OS and deletes any user data
Once you verify the operating system boots, you will be able to lock the bootloader with no concern, and you can always unlock it (while erasing all user data) anytime using fastboot commands on your computer. Assuming you don't disable OEM unlocking in the settings
You can also use fastboot to access recovery, if GOS becomes corrupted (rare), forgot your PIN/password, or is infected in some way, you can access recovery to either sideload an update (which would replace the corrupted OS with the update) or wipe all user data (clearing the infection/clearing your PIN/password...and all user data)
Recovery mode is very useful