In the 1930s, it was found that hemoglobin has magnetic properties that are different depending on whether it is carrying oxygen or not. When the hemoglobin is not carrying oxygen it is more sensitive or paramagnetic than oxygenated blood...It has only been in the last fifteen years that this difference in magnetic property has been used in magnetic resonance imaging (MRI) research. MRI uses a very strong magnetic field so this difference in the magnetic properties of oxygenated and deoxygenated hemoglobin in blood can be detected. This change is called the BOLD (blood oxygenation level dependent) signal.
https://www.sciencelearn.org.nz/resources/1010-does-blood-have-magnetic-properties