Welcome, that's a good question.
The oil pan at the bottom of the engine holds the oil.
That's what the dipstick measures.
There is a pump in the oil pan that pumps oil throughout the engine when it's running.
As you thought, the oil fill cap is just for filling.
When you look into it you may...