Due to enhanced security measures, newer versions of macOS require you to grant After Effects permission to record your screen.
Apple
> System Settings...
in the menu bar.Privacy & Security
in the left list.Screen & System Audio Recording
in the right list.Adobe After Effects
is toggled on.<aside> ⚠️
Older versions of macOS may have this preference in a slightly different location.
</aside>