Why is the outer core made up of liquid rock?
The outer core is not made of liquid rock.
The Earth has multiple layers. The inner core is mainly solid iron crystals. The outer core is a liquid alloy of mainly iron and nickel.
The reason why the core is metal is that the heavy metals sank to the centre while the Earth was cooling. The mantle which lies above the core is made of molten rock.