How to Hide the "Custom Query Blocks" Admin Menu

function plt_hide_post_type_archive_mapping_menus() {
	//Hide the "Settings → Custom Query Blocks" menu.
	remove_submenu_page('options-general.php', 'custom-query-blocks');
}

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

Where do I put this code?