Do you perhaps also have some older NodeJS installed somewhere on your system? Check with the terminal command which node to see where it is installed and if it finds multiple instances.
Did you use the official installer to install NodeJS?
Do you use multiple versions with something like NVM or fnm?
Did you install it using a package manager like Homebrew or MacPorts?
The error indicates that it can't find the node:http module, the node: prefix is supported since version 14.8.0. Git runs under the App environment which doesn't have the same environment variables as the Terminal (zsh/bash) has and on Mac it seems to be missing the PATH. We do lookup Node is common install folders and run it directly from there. It is possible that there is still an old node version installed in one of the following folders: ['/opt/homebrew/bin', '/usr/local/bin', '/opt/local/bin', '/usr/bin', '/bin'].