The problem is that there is a name collision between the core library of the Nano 33 BLE and the TMCStepper library. Here you can see a macro named "D1" was defined in the core library:
raztou3d:
C:\Users\XXX\AppData\Local\Arduino15\packages\arduino\hardware\mbed\1.3.2\variants\ARDUINO_NANO33BLE/pins_arduino.h:82:14: error: expected unqualified-id before numeric constant
#define D1 1
^
And here you can see a function named "D1" was declared in the TMCStepper library:
raztou3d:
C:\Users\XXX\Documents\Arduino\libraries\TMCStepper-master\src/TMCStepper.h:608:12: note: in expansion of macro 'D1'
uint16_t D1();
^
Unfortunately, the only way to fix the conflict is by editing the library, but it's easy enough:
Open C:\Users\XXX\Documents\Arduino\libraries\TMCStepper-master\src/TMCStepper.h in a text editor.
Add the following at line 18:
#undef D1
Save the file.
Now try compiling your sketch again.
It's safe to undefine this macro because it was only added as a convenience for users who might see the "D1", etc. written on the silkscreen of their Nano BLE board and try to use that in the code instead of just the integer pin number 1.
It seems like this was not a very good choice of name by the TMCStepper library author, especially considering a similar D1 macro is also defined for some of the popular ESP8266 boards.