First step would be to get a gun. Next step would be to get training. If it is not possible to get a firearm for legal reasons etc., get training in the use of OC Spray, defensive tactics, maybe even baton training. None of these will be useful if they are not available to you to grab quickly. Understand you have state/local laws to be mindful of as well. Generally speaking, the law will always value life over property. There are cases where you're legally allowed to protect property using deadly force but I don't ever teach from that perspective. A lot of people do not take into account they just because they dodge any criminal charges when using deadly force, the chances are you will be sued for wrongful death/injury or similar. I'm not saying the plaintiff will have a good case against you, but whether they do or have a shit case, it is going to cost you a lot of time and money in legal fees. This means training is key.
Mindset > Tactics > Skill > Gear in this order every time. The gear and skill mean nothing without mindset and tactics. That means you get trained. I can't stress that enough. That is why I do what I do.
Beyond that, it depends on your situation. Have a discussion with others who live with you about a plan in case of break-in. Make sure everyone is on the same page on ingress and egress and what each other's job will be. Who's calling 911, who's armed and who's not, are there kids, etc. But when countering an attacker who is actively being aggressive, your response should be like an animal. Protect your family and yourself and do so quickly and with as much force is it takes to stop the attack, at which point your stop using force.