The fetch that ships with Node has no proxy option. Anyone using plain fetch needs an agent, such as the one undici offers with ProxyAgent pointing at http://username:password@IP:20001.
axios
axios needs an agent too. Its own proxy option covers HTTP; for SOCKS5 on port 20481 a SOCKS-specific agent goes in.
The HTTP_PROXY environment variable works for some libraries and is ignored by others. Set it in code when certainty matters.