EAI_AGAIN means the DNS server replied that it cannot currently full fill the request
The device requires internet connection to download / install extra nodes.
Can you ping 8.8.8.8 from inside the putty session?
Can you curl something from the internet? e.g what do you get if you run curl https://flows.nodered.org/node/node-red-contrib-s7 (inside the putty session to the IOT box)?
PS, out of curiosity, how have you got NODE JS V14.16.0 running on an IOT2040 ?
PS2: node-red V0.20.7 is seriously out o date. If you really have nodejs V14 you can run node-red V1.2.9 (current release)
In which case it is of zero relevance (putty commands are executed on the remote box and the localhost NODEJS version is completely irrelevant)
But thanks for clarifying - siemens dont seem to be supporting their hardware beyond nodejs 8 (or is it v10 - i forget?).