How to Hide the "Next.js On-Demand Revalidation" Admin Menu

function plt_hide_on_demand_revalidation_menus() {
	//Hide the "Settings → Next.js On-Demand Revalidation" menu.
	remove_submenu_page('options-general.php', 'on-demand-revalidation');
}

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

Where do I put this code?