How to Hide Gallery by BestWebSoft Admin Menus

function plt_hide_gallery_plugin_menus() {
	//Hide "Galleries".
	remove_menu_page('edit.php?post_type=bws-gallery');
	//Hide "Galleries → Galleries".
	remove_submenu_page('edit.php?post_type=bws-gallery', 'edit.php?post_type=bws-gallery');
	//Hide "Galleries → Add New Gallery".
	remove_submenu_page('edit.php?post_type=bws-gallery', 'post-new.php?post_type=bws-gallery');
	//Hide "Galleries → Gallery Categories".
	remove_submenu_page('edit.php?post_type=bws-gallery', 'edit-tags.php?taxonomy=gallery_categories&post_type=bws-gallery');
	//Hide "Galleries → Global Settings".
	remove_submenu_page('edit.php?post_type=bws-gallery', 'gallery-plugin.php');
	//Hide "Galleries → BWS Panel".
	remove_submenu_page('edit.php?post_type=bws-gallery', 'gllr-bws-panel');
	//Hide "Galleries → Upgrade to Pro".
	remove_submenu_page('edit.php?post_type=bws-gallery', 'https://bestwebsoft.com/products/wordpress/plugins/gallery/?k=63a36f6bf5de0726ad6a43a165f38fe5&pn=79&v=4.7.5&wp_v=6.8.2');
}

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

Where do I put this code?