Lg G5 sa recovery

Love my phone but old, have had it ‘die’ on me twice now in last 6 weeks. Just got it working after screen showed Fileware upload do not unplug for an hour. I disconnected battery whilst it was plugged in. bingo….working again but what if it dies and I cant get it working. How and where do I back everything up?