Unfortunately, cPanel/WHM cannot be uninstalled by official Methods.
Though, there is one method but that is of 2012 and since then, cPanel has evolved. I tried it back around 2014-2015 and it was still working but I cannot guarantee if it still works. You can Try https://www.askapache.com/hacking/uninstall-cpanel/