* iMessage, which does use true E2E encryption in transit.
* iCloud backup, which backs up the contents of your device (including your unencrypted at-rest iMessage data), and does NOT support E2E encryption.
Technically if you (and all your friends) use iMessage and don’t use iCloud backup, then it is impossible for Apple to read your messages.
In reality, the alternatives to iCloud backup are too risky and/or cumbersome, so most people use it, with the result that Apple can read your iMessages once they’ve been sent/received and your phone has performed a backup.