Sorry I’m not sure what to say here as you appear to be working across three different systems. You are limited to what Apple designed for the given series. So a 21.5” power supply only fits a 21.5” system and the same holds true with a 24” or and 27”
One needs to review the guides to see what power supplies work needed many a time Apple has used the same unit across different years.