The Control Center has tons of toggles and shortcuts like volume, connectivity, screen recording, etc which can be accessed either while using the device or when the device is locked.
The Control Center for sure makes things easier for users, but it also allows others to access the Control Center and mess with them. So, if you do not want to access the Control Center when the device is locked for any reason —be it for added security or simply do not want to access any settings without unlocking the device — then Apple gives users the option to change it.
Open Settings app on your iPhone and iPad
Head to Face ID & Passcode (Touch ID & Passcode on older iPhones with Touch ID)
Verify using your Passcode and then tap on toggle in front of Control Center option and disable it
That’s it. You no longer have access to the Control Center from the lock screen. Do note, if in future you want to enable it, follow the same steps again and turn on the toggle alongside the Control Center option.