Please take a look at the documentation here: https://angular.dev/api/core/ComponentFactoryResolver
The componentFactoryResolver was deprecated in v20.
Therefore, you do not have access to the API and the function cannot be found. This will also explain why the error appeared after updating.