Growing up I saw first-hand what it was like to have brain aneurysm. How can I avoid getting it like my parent?

Developmental. Brain aneurysms are developmental abnormalities, occurring at the branches of brain arteries, where the internal elastic membrane is absent. Their development is not under our control, but the one thing we can do is to make sure we keep out blood pressure in appropriate range.
Good blood pressure. Most aneurysms are congenital and do no harm. Few are thought to develop spontaneously. Trauma could cause one. Nothing can be done to stop the development of most aneurysms. Maintaining normal blood pressure will help prevent enlargement and bleeds in some cases.
Talk to your doctor. Some brain aneurysms are from an inhereted condition, but most are associated with lifestyle risks like smoking, cholesterol and hypertension. These ar ethe things you can control, so avoid tobacco, do regular exercise and control your cholesterol. If your older relative had the inherited type of aneurysm the doctors usually know at the time. Screening selected families may be appropriate.