Try using | bash - instead of | sh -.
curl -fsSL https://get.pnpm.io/install.sh | bash -
curl writes to stdout by default, so the | pipe character diverts the output, in this case the sh terminal. Try using | bash - which will pipe its live output to a bash terminal. The - character at the end means that the terminal will accept anything sent to its stdin. You may not have the sh terminal installed.
Another option: npm i -G pnpm will get you there too and npm ships with Node, which I assume you have on this box.
Make sure to run any of the commands as the user who will be using pnpm, not root.
-f fail silently
-s silent mode
-S show errors in silent mode
-L will follow redirects by using the 3xx-response's output to make a new curl request