Ookla speedtest properly transfers data and divides to find throughput-- both with the website, the GUI app, and their CLI program. The open source speedtest-cli that uses their infrastructure is hampered by only one connection and can't seem to ever report higher than 300mbps.
Fast.com is ... a little optimistic about transients getting transfers started and sometimes reports numbers 5-10% too high.
Neither is grossly wrong by an order of magnitude. Maybe there was also wifi around and simultaneously connected, confounding the situation? Easy to end up in a situation where all your internet traffic is going over wifi (because e.g. your dhcp client replaces the default route with one going over the wifi interface), and all your local traffic goes over ethernet.