Since December 2019 I have had g.fast with TalkTalk, it only dawned on me a few weeks ago that I have never reached the guaranteed 290mb downstream. The most I have reached is 240mb, and whilst I am lucky to have that I am paying for more and feel entitled to it.
A few things to check.
1. When you say you are getting 240Mbps, is that the sync speed, or the achieved data transfer speed to some remote site?
If you have your own G.fast modem, what sync speed does it say you have? Does the
dslchecker show "Observed Speeds", like it does for VDSL?
The sync speed is the raw bit rate between you and the G.fast modem in the cabinet. A throughput speedtest is only measuring the payload of packets, and doesn't count the TCP/IP headers. This alone limits payload speed to about 96% of sync speed.
2. If it's a throughput test, the bottleneck could easily be your PC or whatever it is you're testing from. First thing of course to check is that you are testing over a gigabit wired ethernet connection, not wifi. But I've seen many Windows machines which struggle to handle 200Mbps, due to poor quality of network drivers etc. Swapping to a different NIC can make a big difference - Intel's own-brand PCI NICs work very well.
I have also found some machines where they can fill a gig if you boot them into Linux instead of Windows - apparently Linux has better drivers for some NICs. Try booting from a Linux "live CD".
Problems are not limited to Windows. Speedtest.net is very flash-heavy, and my 2015 Macbook Pro laptop struggles to reach 250M; I can see the CPU load flatlining at 100% in "Activity Monitor" during the test. But running iperf3 from the command line I can easily fill the available bandwidth (or a gigabit to another local device).
3. It could also be a limitation of the provided router, although if you're using a Talktalk-provided one you'd think they'd give you one that's up to the job. If it provides a way to monitor its CPU utilisation, and it sits at 100% during the test, that would give you a clue.
I have a Mikrotik HeX PoE, and it's relatively under-powered (800MHz single CPU). If you tune it to use its "fasttrack" mode, it can do about 900Mbps of IPv4 - or equivalently, I see ~35% CPU load during a 300Mbps speedtest. Unfortunately there's no fasttrack for IPv6 yet, and with v6 it only handles 250-300Mbps.