iPhone 6, iOS 12
iPhone 6 is an outdated iPhone it can’t be update to a higher iOS (13 and later).
The last security updates iOS 12.5.7 -> released September 12, 2022, available for iPhone 6.
If you haven't updated to iOS 12.5.7 yet, go to Settings -> General -> Software Update -> Download and Install.
You need about 5 GB device storage and good Service & Wi-Fi.
If they are On, turn Off Hotspot & VPN.
Charge the battery > 70%.
See the following Apple articles:
Update your iPhone, iPad, or iPod touch
Update your iPhone, iPad, or iPod touch - Apple Support (IN)
If your iPhone, iPad or iPod touch won’t update
If your iPhone, iPad, or iPod touch won't update - Apple Support
You can do the update via PC, see this Apple article: Update software on iPhone, iPad or iPod touch in iTunes on PC
Update software on iPhone, iPad or iPod touch in iTunes on PC – Apple Support (UK)
If you have a Mac see this Apple article: Update your iPhone, iPad, or iPod touch with the Finder
Update your iPhone, iPad, or iPod touch with the Finder - Apple Support