USB & Thunderbolt transmission rates are often different. Even within one of those standards, speeds can be different.
Note that USB-C is a connector type, it is not USB, Thunderbolt or DisplayPort communication. It's just a common physical connector now used for multiple different communication protocols.
In the Mac Mini M4
The rear USB-C ports support
- Thunderbolt 4 (up to 40Gb/s)
- USB 4 (up to 40Gb/s) ... note that these specific ports may not be backward compatible with USB 3, 2 or 1.
The front USB-C ports support
- USB 3 (up to 10Gb/s) ... these ports will be compatible with USB 3 Gen2x1 (10 Gbps) and earlier only
In the Mac Mini M4 Pro
The rear USB-C ports support
- Thunderbolt 5 (up to 120Gb/s)
- USB 4 (up to 40Gb/s) ... note that these specific ports may not be backward compatible with USB 3, 2 or 1.
The front USB-C ports support
- USB 3 (up to 10Gb/s) ... these ports will be compatible with USB 3 Gen2x1 (10Gbps) and earlier only
In all cases the speed is "up to," it is not guaranteed. It is dependent on the connected device(s), the cable and usage.
And, yes, you need the appropriate USB or Thunderbolt cable for whatever "flavor" you are using.