Safety is about protection from harm. It's about management of risk. I'll come on to risk later, but Safety is only ever relative. It's not possible to define it absolutely due to the fact that everyone's - those affected, observers, assessors, regulators, litigators, etc. - viewpoint varies depending on how they're affected by particular attributes. Even then, it's entirely possible for the viewpoint of people within a group and or whole groups or society as a whole's opinions and views to change given time. This change can be subtle and/or immediate.
The best safety example of viewpoint change would be working at height - contrast the famous 1920's videos of workers sitting on girders whilst building tower blocks to anything post 1990 ish, where you'll find everyone involved is harnessed on and probably wearing hi-vis.
Group opinions can change and change quickly too. Look at how quickly the world adopted safety measures various (social distancing, face coverings, additional hand hygiene, working from home etc.) to help fight Coronavirus. Some of these measures will be here for a while longer, others less so and some forever.
Contraversially I'd define safety as being 'being protected from harm through an absence of unreasonable relative risk', noting that I've seen safety defined as 'an absence of risk' (i'll come to that next) and various more complex definitions that aim to capture the legal framework involved, and hence become difficult to understand. The 'unreasonable' and 'relative' aspects here are important - 'unreasonable' implies there a baseline of sorts (I'll discuss the 'Reasonable Man' legal concept another day!) and 'relative' to imply that there's always a situation that can be used for comparison's purposes.
So onto risk and I'll touch on Hazards too. Hazards are essentially, universally 'something with the potential to cause harm' and Hazards can cause Risks to people.
A risk is a fictional being - It has no physical manifestation and is purely a measure (relative or absolute) for use in safety management. Don't get too hung up on defining it, it's a tool for management purposes - IT DOES NOT EXIST.
Risk is most commonly defined as the result of the 'Probability of a given hazard occuring multiplied by it's consequence'. R = P x Q.
Consequence can be anywhere from the most minor of things to death of one or more people (or even greater for more complex things like Trains, Aircraft etc.), but it may change depending on who you're considering - It's usually worth splitting considering by groups affected where consequences change between different groups as probabilities usually change in theses cases too.
Probability renders an interesting question - If something is possible, there is no such thing as zero probability of it occurring. Zero probability = Impossible. This means, by extension there is no such thing as zero risk regardless how small the consequence of a given risk is.
From this, there's a really obvious question - do we need to manage everything? No you just need to manage stuff that creates a unreasonable risk (in terms of consequence, probability or the combination) to the person affected by it. This brings me full circle to the firearm in the picture - if the safety catch is on, the probability of accidental discharge due to it falling off the log is small, but if the catch is off, the accidental discharge probability is much higher - whether there's a risk depends on whether anyone or anything that should be protected is facing the barrel!