The iPhone 15 series, is expected to be released in September 2023. Which will most likely be the first to lack Lightning ports. And by the end of 2024, we should also have the iPhone 16 series and possibly a new iPhone SE with USB-C ports.
If Apple wants to delay the Lightning port even longer, it would have to do so no later than December 2024.
The EU hopes that this law will compel manufacturers to be more environmentally conscious. If every device uses the same connector, people will no longer need to discard cable accessories when upgrading devices.