They're both correct.
"Bi-" is a prefix that comes from Latin meaning "two." Besides "bimonthly," you also have the confusing "biweekly" and "biannually/biennially."
Generally with "bimonthly" and "biweekly," we interpret those words as meaning "every two months" and "every two weeks," even though they can be interpreted as "twice a month" and "twice a week."
If we mean "twice a month" or "twice a week," we'll often say and write it that way because we know "bimonthly" and "biweekly" can be interpreted either way.