Apple tightened the security restrictions in macOS, to make it harder for malware and spyware. But Apple has not worded the message properly. Although it says “screen recording,” it can also mean any time an application wants to use data from the screen. For example, some Mac applications trigger the warning because an eyedropper tool wants to sample a color from the screen. Some applications may need screen data to run a virtual display feature.
Therefore, it’s possible that the warning appeared even though After Effects does not need to record the screen. An After Effects feature may need screen data for one of its normal features. As long as you understand what an application does and trust its developers, it’s OK to grant permission.