If you bought a physical or digital product key, you must first redeem it at office.com/setup to link it to your Microsoft account. Once linked, you activate by signing in.
: Many unofficial activators are wrappers for malware, ransomware, or keyloggers that can compromise your Mac's security. Microsoft Office 365 Activator For Mac
If you've already used an activator, run a reputable Mac antivirus scanner (Malwarebytes for Mac offers a free version) and consider reinstalling macOS to ensure any hidden persistence mechanisms are removed. If you bought a physical or digital product