If online activation fails, try the following:
- Check internet connection.
- Temporarily disable firewall and antivirus.
- Run as administrator.
- Set the system time correctly.
- Use Microsoft’s support and recovery assistant.
- Try phone activation.
- Contact Microsoft support.