Load SharePoint CSOM assemblies in beginning:

    Add-Type -Path (Resolve-Path "C:\Program Files\Common Files\microsoft shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.dll")
    Add-Type -Path (Resolve-Path "C:\Program Files\Common Files\microsoft shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.Runtime.dll")

And try to initialize `$UserCollection` as below in your code:

    [Microsoft.SharePoint.SPFieldUserValueCollection]$UserCollection = new-object Microsoft.SharePoint.SPFieldUserValueCollection

Hope this will help you.