Hi,
It seems AddToCollection is replaced with AppendItemToCollection in the latest Studio22.10.1.
If you need to use AddToCollection for some reason, can you try to downgrade UiPath.System.Activites package to 22.4.5 then put it to your workflow, next upgrade System package to 21.10.1 or higher if necessary.
Regards,