To summarize it mostly from memory, it was a voluntary agreement between 10(ish) phone manufacturers (Apple included) and the EU. It had an expiry date, and it was renewed on a yearly basis 2009-2014.
In 2014 EU figured out this was working fine, and allowed itself up until 2020 to make it obligatory (as opposed to voluntary). They also took this time to figure out categories of products that should be impacted (headphones, cameras, those sorts of things). Then in 2021 they made changes to the directive, setting Type C as the standard.
EU directives are not exactly laws. Instead, it's a way of telling member states what they should be implementing in their own national laws. Member states then have two years to do the actual implementation. So, late 2023 member states will all have slightly different laws, but basically all saying the same (Type C is the only connector allowed, users must have an option to exclude a charger from their purchase). Not quite the same as EU-wide law, but not quite different in practice.
So what will happen after Type C is that the directive is going to be changed, and then there's again going to be a few in-between years. Probably somewhere in between 2 (deadline for member states to implement those changes) and 9 years (how long it took this time around, 2014-2023), because next time around they won't have to spend seven years figuring out details.