Via QR code — encrypted.
A QR code will appear on the new phone; the old phone scans it, and media files are transferred in encrypted packages. The key is only inside the QR code — it is never sent to the server.
On the new phone: Storage → «Transfer» → QR
Scan this QR code on the old phone
Wait for the transfer to finish