Hey! Welcome to the Samsung Community! Yes I think if the lock screen is unlocked then it gets a little tricky but there are a few ways you can access the emergency info. If your Side button is configured to open the shut down menu when it is long pressed, then long press the side button and you should be able to select the medical info option and this should display Med info.
Alternatively you can put emergency info on the lock screen. And see if this link helps!
https://www.samsung.com/latin_en/support/mobile-devices/how-to-use-galaxy-device-in-an-emergency-to-... . Please update me if this helped if not, I am happy to help further. :).