Imagine your computer is an orchestra.
Many different instruments like violins, drums, and trumpets are all part of the orchestra.
An orchestra also has a conductor to direct the flow of the music.
In a computer, the OS is the conductor.
The OS handles resource and memory management to ensure the limited capacity of the computer system is used where it's needed most.
A variety of programs, tasks, and processes are constantly competing for the resources of the central processing unit, or CPU.
They all have their own reasons why they need memory, storage, and input/output bandwidth.
The OS is responsible for ensuring that each program is allocating and de-allocating resources.
All this occurs in your computer at the same time so that your system functions efficiently.