> It's astonishingly easy to not get shot: don't invade someone's home.
The clear, plain-English implication of what you're suggesting is: your risk of getting shot (in the US) is, to a large extent, directly correlated to your invasion of other people's homes.
Except that there's no evidence to support this. According to FBI data from 2015-2019, the ratio of criminal gun homicides to justifiable homicides (as in self-defense) was 34:1.
Over 10,000 innocent people are killed by guns every year in the US, including more than 1,000 young people. This excludes suicides, which itself is a number that you'd probably be wise to pay attention to.