Verify whether your device's bootloader can be officially unlocked.
If you are using a very new Xperia device (released after 2018), you may need a newer version or the NewFlasher tool. However, for classic Xperia devices (Z series, X series, XZ series), 0.9.18.6 is incredibly reliable. Sony Flashtool 0.9.18.6