The parameter should come at the end of the URL:
Invoke-RestMethod -Uri https://gitlab.com/api/v4/projects/1234567?private_token=$my_private_token IfI prefer to pass the token in the header:
Invoke-RestMethod -Headers @{ 'PRIVATE-TOKEN'=$_my_private_token } -Uri http://gitlab.com/api/v4/projects/1234567 https://docs.gitlab.com/ee/api/#personalproject-access-tokens