Activate a new WordPress Theme Only for Admins

At first, you should active the WordPress Debug mode to get the error after implement your code. The code should work, also tested on my environment. I use it on a client installation and works really well. See my source below. It is important that you use the right string for the theme slug, like here popper. You should also use this code as a plugin in the installation, not inside a theme. Also, the hint, if your installation is a Multisite – the theme must be usable for each site, their use the small plugin to switch the theme.

add_filter( 'template', 'fb_change_theme' );
add_filter( 'option_template', 'fb_change_theme' );
add_filter( 'option_stylesheet', 'fb_change_theme' );
add_filter( 'pre_option_stylesheet', 'fb_change_theme' );
function fb_change_theme($theme) {
    
    if ( current_user_can( 'manage_options' ) ) {
        $theme="popper";
    }

    return $theme;
}