The naming is confusing. Let me clear this up:
WH-1000XM6 = Over-ear headphones (go around your ears)
WF-1000XM6 = True wireless earbuds (go in your ears)
The practical differences:
The headphones are better for sound quality. Bigger 30mm drivers, more space for sound to develop, better bass. More comfortable for long sessions because they don't sit inside your ear canal.
The earbuds are better for portability. Fit in your pocket, work for exercise, less conspicuous. Battery life is shorter (8 hours vs 30), but the charging case gives extra charges on the go.
Noise cancellation:
Both are excellent, but headphones win. Over-ear design provides physical isolation earbuds can't match.
Price:
Headphones: $450. Earbuds: ~$300.
Which should you get?
Home, office, or flights: Get the headphones. Better sound, comfort, and ANC.
Exercise, commuting, or portability priority: Get the earbuds.
Honestly:
Many people own both. Earbuds for gym and commute, headphones for everything else. If you listen a lot, that's not a bad approach.