It depends on the camera.
Some cameras need internet for setup, app access, cloud recording, alerts, firmware updates, and remote viewing. Other cameras can record locally without continuous internet if they support microSD card recording, NVR recording, DVR recording, built-in local storage, or local network recording.
A camera may still record locally if it has an SD card or is connected to a recorder. But without internet, you may lose live view from your phone when away from home, motion notifications, cloud recording, remote playback, app alerts, firmware updates, and account sync.
If you only need local recording, some cameras can work without internet. If you want phone alerts, remote viewing, cloud backup, or app access while away from home, you usually need internet.