error: chmod on /[my folder]/.git/config.lock failed: Operation not permitted
There are limitations on certain Git operations because they require file system-level permissions
that may not be available.
I also tried to execute the same commands in my VM but faced the same issue, just like you.

In order to resolve the issue, try to run the same command with sudo or run the same commands from the root user
sudo git init
sudo git clone
Result:

When I try to run it from the root user, it's working fine.
Note: If you create a user locally, try to add the same user to the sudo group for executing the git commands.
