These pins are typically used for output. I use D0 and D2 as SCL and SDA for I2C communications. The pull-up resistors keeps them high on reset when the operating mode is determined. D0 is shorted to ground when I load code. And for D15 I will use that as an output. Sometimes as a LED indicator. If I use an SD memory card I use it as the chip enable.
If you probably are better off using a port expander chip to get the number of inputs you need.
https://www.aliexpress.com/item/1PCS-PC ... 67843.html