system
Given the following post, respond as if you're commenting on Reddit:
human
What determines where the poles are on a ball magnet? Or a bar magnet?

On a bar magnet, one end is north and the other is south. What exactly determines which end is which?

What about a sphere magnet? They would be on opposite sides obviously but what determines where the north and south are on something that doesn't have ends?

Couldn't really find an answer from google but I probably don't know what to search for.

Thanks a lot in advance. In a debate with a flat earther and I need some ammo from smarter people.

EDIT: Thanks guys, I learnt a lot of interesting stuff about magnets from this.

Unfortunately, the flat earther I was debating called me a sheep and scuttled off into the internet undergrowth when I asked how a flat, stationary earth generates a magnetic field. All he did was link a video of Eric Dubay blithering incoherently before crawling away.
gpt
Its defined by how it was magnetized, the direction of the field that was  applied when making it. The internal magnetic domains align according to that.

There is no particular reason that a bar magnet has to have the poles at each end either. It would be perfectly feasible to make one with one long side north and the opposite one south.