Your device may stop recording video when the available storage space begins to run now. The best thing to try is to free up storage space on your device, you will need several GBs of free space for even a few minutes of video recording. It’s a good idea to have at least 4GB-5GB of free space.
You can manage your storage space in the Settings app under General > Storage & iCloud Usage > Manage Storage
It may also help to quit any apps that may be running in the background.