Enable camera in raspi-config
The Enable Camera option in the raspi-config tool is used to enable or disable the Raspberry Pi camera module:
In the window that opens, choose Enable to enable the camera support:
This will ensure that at least 128MB of RAM is dedicated to the GPU (Graphics Processor Unit).