I want to read PWM output signal which I got from a sensor. Is there any way to give PWM signals as input to Raspberry pi 4B?
PWM is a digital signal.
You could (at least in principle) monitor to detect the proportion of time it is HIGH.
If I wanted to do this I would write code to detect rising and falling edges and times.
I am unaware of any existing code although Joan's DHT temperature humidity code would provide an excellent starting point.