It’s not do-able with a NodeMCU. Read this:
You’d either need to use a port expander like the MCP23017…
or use a board with more useable pins such as the ESP32.
Pete.