Two wires, however many modules.
A microcontroller runs out of pins long before you run out of modules to connect. I2C puts them all on the same two wires, and each lesson here shows the part you cannot see.
Why every module can share two wires, and what the two wires are.
The other fundamentals track
Electricity
Volts, current, resistance and the mistakes that kill parts. 35 pages, true of every board.
35 articles →The other fundamentals trackPower and protection
Fuses, ideal diodes, TVS and lithium cells — every part that sits between a supply and something you would rather not replace. 13 pages, with part numbers.
13 articles →The other fundamentals trackWorkshop
The hand skills. Soldering a joint that lasts, and reading the ones that will not. 2 pages, no circuit required.
2 articles →Next, in the ESP32 bookWires on the board
How two chips agree on what a line means, sorted by what it costs you in pins
9 articles, no board required →Next, in the ESP32 bookMessages on the network
Once there is no wire left to agree about, the question is who talks first
5 articles, no board required →