幸好 + [clause]
幸好 + [clause],不然 / 要不然 + [clause]
[clause],幸好 + [clause]
幸好 introduces the lucky fact that saved a situation. It usually starts its clause, before the subject.
A second clause with 不然 or 要不然 spells out what would have happened without that luck.
The problem can also come first, and 幸好 says what limited the damage.
幸亏 means the same. 好在 is close but points to a condition that eases a bad situation rather than a lucky escape.
幸好 comments on an event. It isn't an adjective for a person, and you can't wish it on anyone; those are 幸运 and 好运.