Not hereditary. Sleep apnea is not a hereditary condition. It is not surprising that you are the only one in your family who has it. On the other hand, some of your relatives might have it and not be aware of their condition.
Not inherited always. Obstructive sleep apnea is not a whole inherited disease, many reason related to osa is acquired.
Multiple factors. Many people with osa are unaware that they have it. It does tend to run in families largely due to inherited characteristics of the upper airway but medications, weight, and personal anatomy are important risk factors.
Variable causation. OSA can be inherited, or not. It can relate to your lifestyle, medication, weight, airway anatomy. Best advice is to seek evaluation by a board certified sleep expert.