How to Hide the "Record of Consent" Admin Menu

function plt_hide_record_of_consent_extension_for_complianz_menus() {
	//Hide the "Tools → Record of Consent" menu.
	remove_submenu_page('tools.php', 'rocext-custom-consent');
}

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

Where do I put this code?