A cloud-based identity and access management service for securing user authentication and resource access
Use the Microsoft Graph SDK for PowerShell, which runs fine on PS Core and non-windows devices: https://learn.microsoft.com/en-us/powershell/microsoftgraph/installation?view=graph-powershell-1.0
Once installed/connected, run the following cmdlet:
Set-MgUserManagerByRef -UserId ******@domain.com -BodyParameter @{ "@odata.id"= "https://graph.microsoft.com/v1.0/users/584b2b38-4321-1234-8888-c9766cb4791b"}
where you need to designate the manager as a reference object. Basically, you need to get the objectID and prepare it as input for the hashtable. I know, it's a crappy format, but that's what you get when Microsoft cannot be bothered to release proper cmdlets and relies on autogenerated crap.