Install Termux and enable storage access:

Unlocking Android Bootloaders Directly From Termux: A Complete Guide

If you see a serial number, you are connected.

A USB On-The-Go (OTG) adapter or a direct Type-C to Type-C cable to physically link both phones.

If successful, you will see a serial number. If you see < waiting for any device > , your OTG setup is failing (check root permissions or try a different cable).

You can install android-tools (fastboot/adb) in Termux and try:

Lock and unlock the bootloader | Android Open Source Project

Unlocking Android Bootloaders via Termux: Myths, Realities, and Step-by-Step Guide