Aside - as with TB4 and USB4 (see previous post), TB5 is just USB4v2 with stricter minimum specs/options and an Intel certification program. While the TB5 standard came a bit late to be integrated in to the M4 series, USB4v2 which actually defines the technology came somewhat earlier and might have made the cut.What is even more interesting is the chance that the M4 Pro/Max variants will support Thunderbolt 5.
The base M2 supports TB4 - see the specs for the M2 Mac Mini. The restriction was the base M2/M3 only support 2 displays and TB4 requires two over Thunderbolt. So you couldn't have TB4 plus a permanent internal display and the MacBook ports had to be described as "TB3/USB4".The base M3 supports TB3, while the base M4 supports TB4.
The base M3 probably supports TB4 in theory - but has never been fitted to a machine without a permanent internal display, so we wouldn't know.