Stick with 10-gauge for your 240V dust collector.
Yes, you need a proper 10/3 cord with NEMA 6-50 connectors on both ends.
Your dust collector draws serious amperage at 240V. A 6-50 plug means it expects a 50-amp circuit, but most dust collectors actually pull less than that — still, you want a cord that can handle 40+ amps without voltage drop or overheating. 10-gauge (10/3) is the sweet spot for runs under 50 feet. If you’re going longer, step up to 8-gauge.
Don’t use a 12-gauge cord meant for 120V tools. That’s asking for a melted plug or a motor that runs hot and slow. Also, get a cord with SOOW or similar rubber jacket —