1) dwm is an X window manager.
2) X apps work on Wayland, Quartz, etc. because there are X servers foe those environments, Xwayland is currently the only maintained X server; it too will eventually go away (especially when the toolkit maintainers drop X support altogether).