Okay Attah was correct.
So on Fedora 40 the android-fastboot version is too new.
I had to remove it: $ sudo dnf remove android-tools
And then download and install the older version, in rpm here:
https://dl.fedoraproject.org/pub/fedora/linux/releases/39/Everything/x86_64/os/Packages/a/android-tools-33.0.3p1-1.fc38.x86_64.rpm
Flashing worked. Solved. Thanks.