How to Hide the "ShortPixel AI" Admin Menu

function plt_hide_shortpixel_adaptive_images_menus() {
	//Hide the "Settings → ShortPixel AI" menu.
	remove_submenu_page('options-general.php', 'shortpixel-ai-settings');
}

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

Where do I put this code?