There could be many reasons for the failure of running the iperf3 tool. As commented in the stackoverflow.com thread, you should be considering various parameters checklists while using the iperf3.
As explained in Google Cloud's community tutorial, if you would like to allow the server and client communication through the Google Cloud firewall, you only need to create a firewall rule to the iPerf3 server to allow ingress TCP on the selected port. It seems like no other configuration requirements are in need for the Google Cloud Platform's firewall rules.
If the iPerf3 tool is not assisting you very well in your situation, you may need to advance your testing with the help of other well-documented tools such as Netperf or Perfkit Benchmarker as an alternative.