Fast connections to router, but slow connection between PCs

Hi, I am new to openwrt. I just bought a Dlink dir-2640 router and flashed it with openwrt. After a while of tinkering I have figured out how to set up 2.4GHz and 5GHz wifi. All of my devices are connected and internet speeds are fine. The problem is the connections between devices on the network. Specifically I need a fast and stable connection between two PCs on the network. One is connected via ethernet and the other via 5GHz wifi. I need a stable connection of atleast 100mbps up and down between the pcs. I have installed iperf3 on both PCs and the router and I have been testing speeds. Connections to the router are fast and stable, above 300mbps always whether through ethernet or wifi. But when I test the speed between the two Pcs I only get about 70mbps up or down. If the connections to the router are over 300mbps on both ends shouldn't the connection between the PCs be around the same? The hardware should be more than capable of this so I assume that I have to change some settings about the local network but I am not sure. Thanks for your help.

If you ran iperf3 directly on the Dlink, you are not measuring performance of packets passing through the router between the wifi and LAN interfaces.

Have you tried 22.03 ?
Is packet steering enabled?

Right, that is the problem I don't know why packet transfer is so slow between wifi and LAN. I have tried with and without packet steering enabled. I didn't notice any differences. On the wiki page for D-Link DIR-2640 A1, it is only supported up to 21.02.3. However on that same wiki page a snapshot build is linked that corrects for some issues with 5GHz interface. So the build I am on is 22.167.28356-8effea5

Firmware Version: OpenWrt SNAPSHOT r20025-c6390e52b0 / LuCI Master git-22.167.28356-8effea5

back up existing settings before upgrade via LuCI.
You may need to untick the 'Keep Settings' check box.

fwiw, for best wireless compatibility with wifi devices, and best speed, you may wish to try a separate wireless access point running stock/oem firmwares.