[noun] + を機に [verb plain] + の + を機に
Variants:
The grammar structure を機に (をきに) is used to express that someone takes a particular event or occasion as a turning point or opportunity to do something new, make a change, or start something. It conveys the idea of "taking the occasion of X to do Y" or "using X as an opportunity to Y."
The event described before を機に is typically a significant life event, milestone, or notable change – something weighty enough to serve as a catalyst for action.
The noun before を機に is usually a significant event such as けっこん結婚 (marriage), にゅうがく入学 (enrollment), たいしょく退職 (retirement), しゅっさん出産 (childbirth), ひっこし引っ越し (moving), or a notable experience. It would sound unnatural to use trivial everyday events.
を機に can also appear as を機にして, with the same meaning but a slightly more formal or emphatic tone.