Two ways to do this. Inner work (e.g. inner alchemy, cultivation of the light body) and actual protective measures. For inner work, the inner alchemy practices of different systems, especially those in the taoist and nei-gong, can help to build up the astral body and its energetic connection to the physical body. Additionally, using character refinement techniques to balance out your personality traits can help out a ton because your emotions / personality can also have a big impact on the state of your astral body. Using meditative practices is also essential because it calms many different levels of the individual from physical to astal to mental. All of these will go to building a strong astral body from the foundational level.
For day-to-day life, spiritual protection of the astral body is an important fortification. I am not saying go full fortress mode, but having some form of shielding or warding on yourself is always helpful. People, places, and spirits alike can exert a negative (or positive) influence on the astral body through direct energetic interaction or even just through emotional manipulation. These things can destabilise the astral body directly or indirectly (e.g. through the emotions). A shield / ward against these things is helpful on a day to day basis and I have found it to be very powerful to stabilise myself or to avoid destabilising influences. Many people visualise shields with protective intent, but if you want a specific ritual, you might find a shielding ritual or a protective mantra to be helpful. I prefer protective mantras while visualising a powerful white light enveloping my aura and a shield around myself. The visualisation (and an affirmation for protection) provides the intent for the mantra and the mantra provides the power to be focused. If you use a good mantra, you aren't just relying on "hope" and visualisation anymore, you are tapping into an established current (or egregore) and using visualisation as a direction.
These are my 2cents. You might find other suggestions helpful too ofc.