A compass works on Flat Earth using a radial magnetic field with where there are infinite south poles.
https://www.researchgate.net/figure/Radial-magnetic-field-vector_fig1_309252454
https://www.researchgate.net/figure/Radial-magnetic-field-vector_fig1_309252454