An ordinary solar cell does one thing: when the sun shines, current flows. Here, when the sun shines, the current flows differently depending on which side you bring the magnet.
A magnet that stacks up like a pile of pancakes: that's how the material CrSBr is structured. At low temperatures, each layer is magnetized, but neighboring layers point in opposite directions, and their magnetic fields cancel each other out. This order is called antiferromagnetic, and it's fragile: just a slight warming demagnetizes the layers.