How can I backup my device with a broken screen and a lockscreen passcode?

right so ive got an iphone 5s and have broken the screen want to get it fixed but need to back it up before i do as ive been told i will lose everything on it, have tried to do this but have a lock on phone and cant type it in to do so. is there anyway otherway i can back it up or if i get it fixed and wont wipe it??
Re: cant back up iphone! need help or advice

Can you not connect the device to your computer, if applicable, and back it up via iTunes?

Original thread: https://forums.imore.com/threads/how-can-i-backup-my-device-with-a-broken-screen-and-a-lockscreen-passcode.297543/