From what I understand, the -ComputerName was previously removed which includes its usage with get-service and in the following link its stated what you can do instead: https://learn.microsoft.com/en-us/powershell/scripting/samples/managing-services?view=powershell-7.3#getting-remote-services See the note after the words that make it look like its available. That's not put in there well lol.
Invoke-Command -ComputerName Server02 -ScriptBlock { Get-Service }
You can also manage services with the other *-Service cmdlets. For more information on PowerShell remoting, see about_Remote.
I'm not really surprised you don't understand as the error was programming based. You need to get used to seeing that and understanding it (to an extent). But, when it comes to command line its normal to be able to go find documentation such as get-service https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.management/get-service?view=powershell-7.3 and it will show how to use things. In this case it was PowerShell documentation. If you have a problem, look up the documentation :)
For the programming aspect "InvalidOperationException" says its not valid. So you know it doesn't like what you put there.