How to Hide GDPR tools: comment ip removement Admin Menus

function plt_hide_dsgvo_tools_kommentar_ip_entfernen_menus() {
	//Hide the "Comments → All Comments" menu.
	remove_submenu_page('edit-comments.php', 'edit-comments.php');
	//Hide the "Comments → GDPR tools: comment ip" menu.
	remove_submenu_page('edit-comments.php', 'fhw_dsgvo_kommentar_options');
}

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

Where do I put this code?