How to Hide Gutenberg Admin Menus

function plt_hide_gutenberg_menus() {
	//Hide the "Appearance → Fonts" menu.
	remove_submenu_page('themes.php', 'font-library-wp-admin');

	//Hide the "Settings → Connectors" menu.
	remove_submenu_page('options-general.php', 'options-connectors-wp-admin');
	//Hide the "Settings → Gutenberg" menu.
	remove_submenu_page('options-general.php', 'experiments-wp-admin');
}

add_action('admin_menu', 'plt_hide_gutenberg_menus', 101);

Where do I put this code?