Tips on Customizing Yoast SEO

How to Hide Yoast SEO Admin Menus

function plt_hide_wordpress_seo_menus() {
	//Hide "SEO".
	remove_menu_page('wpseo_dashboard');
	//Hide "SEO → General".
	remove_submenu_page('wpseo_dashboard', 'wpseo_dashboard');
	//Hide "SEO → Search Appearance".
	remove_submenu_page('wpseo_dashboard', 'wpseo_titles');
	//Hide "SEO → Search Console".
	remove_submenu_page('wpseo_dashboard', 'wpseo_search_console');
	//Hide "SEO → Social".
	remove_submenu_page('wpseo_dashboard', 'wpseo_social');
	//Hide "SEO → Tools".
	remove_submenu_page('wpseo_dashboard', 'wpseo_tools');
	//Hide "SEO → Premium".
	remove_submenu_page('wpseo_dashboard', 'wpseo_licenses');
	//Hide "SEO → Courses".
	remove_submenu_page('wpseo_dashboard', 'wpseo_courses');
}

add_action('admin_menu', 'plt_hide_wordpress_seo_menus', 11);

Where do I put this code?

How to Hide the "Yoast SEO" Meta Box

function plt_hide_wordpress_seo_metaboxes() {
	$screen = get_current_screen();
	if ( !$screen ) {
		return;
	}

	//Hide the "Yoast SEO" meta box.
	remove_meta_box('wpseo_meta', $screen->id, 'normal');
}

add_action('add_meta_boxes', 'plt_hide_wordpress_seo_metaboxes', 20);

How to Hide the "Yoast SEO Posts Overview" Dashboard Widget

function plt_hide_wordpress_seo_dashboard_widgets() {
	$screen = get_current_screen();
	if ( !$screen ) {
		return;
	}

	//Remove the "Yoast SEO Posts Overview" widget.
	remove_meta_box('wpseo-dashboard-overview', 'dashboard', 'normal');
}

add_action('wp_dashboard_setup', 'plt_hide_wordpress_seo_dashboard_widgets', 20);