You should install RaspiOS from the official image or have your Raspberry Pi ready. Sorry, no details for that. There are lot's of helpful resources available.
Since dwm is in the official Repo's, just install it
sudo apt install dwm
And go configure it in the following files:
Edit /etc/xdg/lxsession/LXDE-pi/desktop.conf. Locate the line that specifies the window_manager and change it to dwm.
[Session]
window_manager=dwm
Next is /etc/xdg/lxsession/LXDE-pi/autostart. Comment the line for lxpanel and pcmanfm. I also commented the xscreensaver, but you can make your own choice about that.
#@lxpanel --profile LXDE-pi
#@pcmanfm --desktop --profile LXDE-pi
#@xscreensaver -no-splash
I also changed the default x-window-manager in update-alternatives though that is not necessary.
update-alternatives --config x-window-manager
That's it. Have fun with dwm which will save resources.