Is there a way to switch to another theme?

switch_theme() is the function you need but this…

why is someone changing the stylesheet and no longer changing the

… indicates a misunderstanding. You provide the $stylesheet as an argument but you are switching the theme as a whole not just the stylesheet. And, for reasons unknown, $stylesheet isn’t the stylesheet. It is:

$stylesheet is the name of your folder slug. It’s the same value that
you’d use for a child theme, something like twentythirteen.