Open Settings, tap Camera, tap Formats, and choose Most Compatible. From that moment your iPhone captures JPG instead of HEIC. Two things to know before you do it: photos you have already taken are not changed — you will still need to convert those to JPG — and your photos will take up roughly twice the space from now on.
The setting
Settings → Camera → Formats. There are two choices. High Efficiency captures HEIF for photos and HEVC for video, which is the default on every recent iPhone. Most Compatible captures JPEG and H.264 instead. Choosing Most Compatible changes what the camera writes from the next shot onward.
There is a second setting worth changing at the same time: Settings → Photos, then scroll to Transfer to Mac or PC. Set it to Automatic and iOS converts photos to JPEG as they are copied off the phone, even when they are stored as HEIC. Keep Originals sends the HEIC across untouched, which is where a lot of the “why won't Windows open this” frustration comes from.
What it costs you
Space, mostly. HEIC is roughly half the size of a JPEG at comparable quality, so switching to Most Compatible means your photo library grows about twice as fast. On a 128 GB phone that is a real consideration; on a 512 GB one, less so.
You also give up a little quality headroom. HEIC stores more tonal information than an 8-bit JPEG, which matters if you edit heavily. And some capture modes still require High Efficiency — ProRAW and the higher frame-rate 4K video modes among them — so the setting is not a complete escape from Apple's modern formats.
Your existing photos don't change
This is the part that catches people out. The Formats setting governs what the camera writes next; it does not go back through your library and rewrite what is already there. If you have three years of HEIC photos, they stay HEIC after you flip the switch.
To deal with those, convert them — HEIC to JPG for photographs, or HEIC to PNG when you need lossless output. Both run in your browser, which matters more than usual here: photos carry location data, and a converter that never receives the file cannot read it.
Should you actually change it?
If you regularly move photos to a Windows machine, upload to sites that reject HEIC, or share files with people running older software, yes — the storage cost is worth not fighting the format every time. If you mostly stay inside Apple's ecosystem, where HEIC works everywhere, leave it on High Efficiency and convert the occasional file when something refuses it. HEIC is the better format; the problem was never the format, only what it has to talk to.