Due to increased security measures, macOS Catalina and newer will require you to allow After Effects to record your screen.
Apple
> System Preference
in the menu bar.Security & Privacy
icon.Privacy
tab.Screen Recording
Adobe After Effects
is checked.