Are you using windows? I assume you already have the latest platform tools from Google and the OnePlus USB drivers installed. Sometimes you have to disable driver signature verification for the drivers to install correctly. See if this post helps.When I today had to restore my device to OOS I first tried it with this method but at the step where the phone rebooted to fastbootd the command was just saying "waiting for device" and nothing more happened.
On the phone I could see that it had rebooted into fastbootd mode but the Computer was just saying "waiting for device".
I could not figure out why that is not working.