How to Prevent Processes Like Xorg from Using Your NVIDIA GPU on Linux

DISCLAIMER: This is heavily inspired from my conversation with ChatGPT and my experiences with implementing it on my laptop.