How to Hide AI Engine: ChatGPT, GPT3 Content & Image Generator, Playground Admin Menus

function plt_hide_ai_engine_menus() {
	//Hide "Posts → Generate New".
	remove_submenu_page('edit.php', 'mwai_content_generator');

	//Hide "Tools → AI Playground".
	remove_submenu_page('tools.php', 'mwai_dashboard');
	//Hide "Tools → Content Generator".
	remove_submenu_page('tools.php', 'mwai_content_generator');
	//Hide "Tools → Image Generator".
	remove_submenu_page('tools.php', 'mwai_image_generator');

	//Hide "Meow Apps".
	remove_menu_page('meowapps-main-menu');
	//Hide "Meow Apps → Dashboard".
	remove_submenu_page('meowapps-main-menu', 'meowapps-main-menu');
	//Hide "Meow Apps → AI Engine".
	remove_submenu_page('meowapps-main-menu', 'mwai_settings');
}

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

Where do I put this code?