How to Hide Password Protected Admin Menus

function plt_hide_password_protected_menus() {
	//Hide "Settings → Password Protected".
	remove_submenu_page('options-general.php', 'password-protected');

	//Hide "Password Protected".
	remove_menu_page('password-protected');
	//Hide "Password Protected → Password Protected".
	remove_submenu_page('password-protected', 'password-protected');
	//Hide "Password Protected → ↳ ⭐ Get Pro".
	remove_submenu_page('password-protected', 'password-protected-get-pro');
}

add_action('admin_menu', 'plt_hide_password_protected_menus', 1000000000);

Where do I put this code?