You may need to go into a config file (.conf) and change a path. On DWM, the source provided from suckless uses /usr/X11R6/blah blah blah, but on NetBSD 9.2, it needs to be changed to /usr/X11R7/blah blah blah. So try checking the paths where it is looking for X11 header files.
Edit: not .conf, but for dwm it is a file called config.mk.
For reference, the lines in dwm's file are these:
X11INC = /usr/X11R6/include
X11LIB = /usr/X11R6/lib
FrankenWM is probably having the same thing going on where the path to find X11 header files is not correct. As indicated by this line from your output:
frankenwm.c:13:10: fatal error: 'X11/Xlib.h' file not found