“O” is an older spelling of “oh” which survives today mostly in poetry. The title of the Canadian national anthem is “O Canada,” not “Oh Canada.”

Similarly, “America the Beautiful” begins “O beautiful for spacious skies.”

When not addressing some entity poetically, “oh” is fine.