iPhones have a feature called Medical ID. It makes emergency information available without a passcode.
Access it by clicking Emergency on your lock screen, and then clicking medical ID. You can display your birthday, medical notes, and add emergency contacts. Fill it up with medical information by clicking on the Health App, and then clicking on the bottom right “Medical ID” icon. Here’s where you add medical information and emergency contacts.
What’s on this screen can be seen by anyone with access to your iPhone. To change that you can turn off “Show when locked” or delete the info completely. Apple does upload your Medical ID to iCloud but it does not include it in your health data or share it with other apps.