While some people have gotten Linux to boot on old iPhones, I don't think it's anywhere close to being a Raspberry Pi replacement at this point.
I ask because I'm seriously considering trying with an iPhone 12 but wonder if something glaring will get in the way or make it not ideal.
Unless you’re interested in joining a community trying to develop Linux on the iPhone, it’s really not worth it. There are thousands of better ways to go.
Thanks!