How to Hide the "WP Consent Receipt" Admin Menu

function plt_hide_wp_consent_receipt_menus() {
	//Hide the "Settings → WP Consent Receipt" menu.
	remove_submenu_page('options-general.php', 'wp_consent_receipt');
}

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

Where do I put this code?