Breakup is one word when it’s a noun (e.g., it was a bad breakup) or an adjective (I’m writing a breakup song). It’s two words (break up) when it functions as a verb (I think we should break up). Some publishers use the hyphenated break-up in place of the one-word form.