Taking a light fixture down and installing ceiling fan in bedroom. House was built in 1968

How to wire ceiling fan to this?
Wires coming from ceiling fan are Blue,Black,White,Green.
You have an old-style switch loop:
Black wire nut = Two blacks/white = incoming hot (black), outgoing hot (black), always hot to switch (white)
Yellow wire nut = switched hot + light hot
Red wire nut = incoming neutral + outgoing neutral + light neutral
This is a standard configuration. For a new light or light/fan, connect black (hot) to the yellow wire nut and white (neutral) to the red wire nut. But there are two limitations:
No neutral in the switch box
This limits your ability to use a smart switch. However, many fans now come with, or have available as an optional accessory, a remote control. The remote control receiver is installed in the ceiling on the fan and allows control of both fan and light, so unless you need a timer, motion sensor or WiFi control you should be OK.
Only one switched hot
Traditionally, a fan/light has two separate switched hots, one for the fan and one for the light. You only have one switched hot. The typical fan/light remote is the usual solution, or you can get a fan with pull chains.