Usually I get about 40 Mbps on 4g and 300 on 5g
Yeah that's pretty crap. AFAIK the record (for an actual speed test, not just a theoretical one) is 2.6Gbps and that was set a decade ago. On 4G. With Sprint by the way.
That was obviously ideal conditions. But a good 4G connection can easily run at 300.