Hi. Not sure about a step-by-step guide, but I suggest reading classic old books series "Definitive Guides to the X Window System" (aka "colour books") Especially "X Windows System Administrator's Guide" and "X Windows System User Guide". They are pretty old but really helped me with understand the generic XWindows configuration process (what is server, how client finds it, what is display manager and window manager, what is resource etc)
https://www.amazon.com/Windows-System-Administrators-Definitive-Guides/dp/0937175838 https://www.amazon.com/Window-System-Users-Definitive-Guides/dp/0937175145