If you're being redirected to appleid.apple.com without a valid security certificate, that's a serious red flag, especially when combined with the recent deletion of your iCloud contacts. The real Apple ID site should always load securely with "https://" and display a valid certificate—anything else could indicate a potential man-in-the-middle attack, phishing attempt, or DNS hijacking. This may suggest your Apple ID or device has been compromised.
You should immediately stop using any suspicious network, run antivirus and malware scans on your devices, and go directly (by typing the URL yourself) to https://appleid.apple.com to change your password and enable two-factor authentication if it’s not already on. Check the list of devices linked to your Apple ID and remove any that you don’t recognize.
You can also request your data from Apple via https://privacy.apple.com to review recent activity. Other users have reported similar issues, often due to phishing, compromised Wi-Fi networks, or malicious software. It’s critical that you contact Apple Support right away to investigate further and secure your account.