You can sleep in your car without rolling the windows down as long as it's not hot out and as long as the vehicle is not running.
If it's hot out, you should roll the windows down at least some to allow some air in through the night.
Although if it's cold you can leave the windows rolled up while you sleep as long as the car is not running.
Cars are not completely airtight and some oxygen will still be able to get into the car.
It is safe to sleep in a car with the windows closed as long as the weather is not too hot or as long as the car is not running and there's nothing in the car depleting the oxygen in the car or producing carbon monoxide.
If you need to sleep in the car and have a heat source then the windows should be cracked open to allow air flow into the car to replace the oxygen.
However you should not sleep in the car with the engine running as even with windows cracked open, the carbon monoxide can still build up in the car when the car is not moving.
This is true even if the exhaust is in good shape and the tailpipe is not blocked.
When the car is moving, the airflow keeps the exhaust from building up around the vehicle, but when your vehicle is not moving, the exhaust can just linger and build up around and underneath the vehicle, which can enter the vehicle and cause death which is silent.
If you need to stay warm you should ideally use blankets or even a 12 volt electric blanket and avoid using other heat sources unless you can stay awake.
I've had to stay awake through the night before when I was stranded overnight due to icy roads and had to run the engine occasionally to keep warm.
But I would never sleep through the night like that as I may not wake up.