Sure, you can use soap…
You may absolutely use dish soap to wash a cast-iron pan. If you’re a cast-iron newbie, know that there are people who will go all red in the face if you merely suggest using dish soap on a cast-iron pan, their blood pressure will rise at such heresy. It’s insane, obviously — there is truly no need in this world to get so upset over a skillet — but it should also give you, the cast-iron newbie, a sense of how good cast iron can be. People love it enough to get heart attack-level mad at the mere suggestion of maltreatment.
But you, the cast-iron newbie, should not pay them too much mind; soap is A-OK. And here’s why: the idea behind the anti-soap directive is that the soap will erode the layer of oil-based seasoning that protects the pan and gives it its nonstick property. Which makes sense! Except for the pesky fact that when the oil used to season the pan is exposed to heat for a prolonged time, its chemistry changes and, as this explainer from Serious Eats details, it becomes polymerized. That means that you can wash your well-seasoned cast iron using soap after all, oh my God!
… but soap isn’t necessary
Maybe, though, you’re curious about the how to clean a cast-iron pan without the use of detergent. Go with God. It’s your cookware, and you should do to it what you want — plus, there are loads of good ways to clean a cast-iron pan without using soap, such as the slightly medieval CM Scrubber (“CM” stands for chain mail). The CM Scrubber is made from stainless steel and is used with warm water to scour grease and bits of food off of your cast iron.
If your cast-iron cookware does develop rust, you can use that salt method or a very fine steel wool to scrub it away. After removing the rust, re-season the pan, which will help to prevent more rust from developing and will leave you with a happy and healthy cast-iron skillet… one that’ll probably still be in your family centuries from now.
How To Cook With Cast Iron
https://www.youtube.com/watch?v=KLGSLCaksdY