You might look at the Fluxgate Magnetometer More details here and a DIY project here
It is not a particularly hard project if you know some basic electronics, or maybe you could buy a readymade one, although they are going to be a lot more expensive than the Hall Effect one you get in phones. However, they can measure down to the nano-Teslas
A fluxgate magnetometer consists of a small, magnetically susceptible
core wrapped by two coils of wire. An alternating electric current is
passed through one coil, driving the core through an alternating cycle
of magnetic saturation; i.e., magnetised, unmagnetised, inversely
magnetised, unmagnetised, magnetised, and so forth. This constantly
changing field induces an electric current in the second coil, and
this output current is measured by a detector. In a magnetically
neutral background, the input and output currents match. However, when
the core is exposed to a background field, it is more easily saturated
in alignment with that field and less easily saturated in opposition
to it. Hence the alternating magnetic field, and the induced output
current, are out of step with the input current. The extent to which
this is the case depends on the strength of the background magnetic
field. Often, the current in the output coil is integrated, yielding
an output analog voltage, proportional to the magnetic field.