In general, stainless steel is not magnetic in the form of austenite. However, martensite and ferrite will be magnetic, but austenite may also be magnetic. There are two reasons for this:
When solidifying, some of the magnetic properties will remain due to partial smelting. For example, it is normal for 304 to remain 3-8%. Therefore, austenite should be non-magnetic or weakly magnetic.
Austenitic stainless steel is non-magnetic, but after cold working hardening, the γ phase will be partially magnetized and will produce magnetism. The martensite structure can be removed by heat treatment to restore its non-magnetic properties.