Digitalread() always returns 0 for an input pin

Hi all,
this is my first time raising a topic here.
I am trying to read a pin that I already set as input pin using pinmode function, but the result is always LOW even when I feed the pin around 3.2V, I am using an esp32-c3-devkitm-1 and I am using pins 4 and 10 for this (I am using the other pins for other purposes).
Any ideas as to how to fix this would be much appreciated.
thank you in advance.

GPIO 4 should be okay. But GPIOs 6 to 11 cant be used because they are connected to the internal Flash!

Here is a good description which GPIOs can be used: ESP32 Pinout Reference: Which GPIO pins should you use? | Random Nerd Tutorials

Hi Sivar,
thank you for your reply.
The board that I am using only uses certain pins from the micro-controller, after avoiding the strapping pins 2, 8 and 9, I am only left with limited choice as i will be using most of the pins on the board.
This is the link to the board that I am using.
https://docs.espressif.com/projects/esp-idf/en/stable/esp32c3/hw-reference/esp32c3/user-guide-devkitm-1.html#user-guide-c3-devkitm-1-v1-board-front
I am connecting a signal pins coming from an endstop of a Transmissive Optical Sensor with Phototransistor Output to the pins (In my circuit I have two stepper motors, for x and y direction, and I am using one endstop sensor for each direction). The board that I am using is different to the one you sent me the link to check.
and pin 4 is not working too as expected when using digitalread().

Sorry, my fault. I missed “c3”. I should have read your post more carefully.

No worries, now it is woking, I did not change anything in my circuit or my script, I cannot find any explanation, I just tried connecting a 3.3v directly to the pins and it was detected as high and when I switched back to the signal coming from the sensor it worked.
Thank you for your assistance.