Re: how to install new software to samsung s5 when it's turned off
From power off (remove the battery then press the power button for a few seconds, if it won't just turn off normally), press the Volume Down key, the Home key, then the power button and keep them all pressed. You should get to a screen with an Android and a warning. That's the download screen and you want to proceed to it (I think that's Volume Up - it'll say).
You want to download the ROM for that model S5 for your country/carrier. Then follow the instructions at
[Samsung] How to flash Stock ROM via ODIN. It'll reinstall the ROM, and the phone should work. (It may look intimidating, but it's actually very boring.)
If the phone isn't backed up (anything you don't want to lose should always be backed up on at least one other device - you never know when you drop the phone crossing the street and a truck rolls over it), see
Recovering files via adb (Post #22). You can probably recover all your files (pictures, music, etc., if you take your time. (Do that
BEFORE flashing the ROM. Flashing a ROM gives you an out-of-the-box phone. Nothing you put on the phone will be there - not even your Google account.)