Forgot password on Samsung Galaxy S7 Edge, trying to access for Google Authenticator
You have two problems:
First, when the bootloader is locked, you can not use fastboot. Unlocking will wipe your data. If the bootloader is unlocked, you can just boot twrp without flashing (fastboot boot twrp.img).
Second, the data partition is encrypted, and even if TWRP should be able to manage decryption, the pin is reqired.
You have no other option than brute force. If USB-OTG is working and it is a 4 digit pin, this can be done with Teensy or any other microcontroller. But this may wipe your data after 10 attempts, depending on gatekeeper settings (afaik not for S7).