Which charger(s) were being used to charge the 12 & the 12 Pro Max?
The 20W USB-C Power Delivery standard is 9V @2.22A, which is a relatively new standard. This standard is supported by the new Apple 20W USB-C charger and updated versions of the Anker Nano, etc. If you use another charger that does not explicitly support this standard, you will see around 18W max, even if you use a 100W PD charger. Check the Power delivery standards supported by the charger(s) you are using to see if 9V @ 2.22A is listed.
The phone will negotiate with the charger as to its current state of charge as well as other factors such as internal temperature, etc. to determine how many watts it will consume.
Another thing to consider is if the battery management feature is active on the phone. This might explain the discrepancy.