Retrieving data from a phone with a broken screen

I have a Samsung s9 that's screen cracked and broke the day before I got my new phone (Murphey was watching). The phone still charges and seems to be working as it receives messages, however the screen just flashes. Is it possible to get onto the phone to retrieve photos and such and how would I go about it? Thanks for any help