Whether a movie scored a profit or a loss is, ultimately, an opaque process. Only the studio’s accountants know for sure. For us outsiders, the best we can do is use a very rough rule-of-thumb: when a movie’s box office has doubled its production budget, it’s broken even. (Though, some prefer 2.5X rather than 2X.) To be sure, there are other expenses beyond production (e.g., distribution and advertising) which can be substantial. But there are also other sources of revenue (e.g., PPV, streaming, etc.). So the theory is that these additional factors cancel out and the original rule-of-thumb is more-or-less valid.
With obvious cases, there’s not much to debate. For example, we can be reasonably certain (ignoring “Hollywood accounting” shenanigans) that Wonka is well into profitability. And it’s equally certain that The Flash lost a lot of money. Aquaman 2, however, is on the borderline. So without access to the actual P&L statements, its status is just a guess.