Nearby Share is essentially the Android version of Apple’s AirDrop as it allows you to send large files from one Android device to another wirelessly through Bluetooth and Wi-Fi. You can even use Nearby Share to send data and files between your own devices. To do that, you would have to make sure that the receiving device appears as an option in the Nearby Share sharing menu of the sending phone.
A video shared by Android Authority shows how a Pixel 6 Pro lists a Pixel 7 Pro on its Nearby Share sharing list even though the Pixel 7 Pro is not turned on. The third phone in the group, an Asus Zenfone 9, had to have the screen turned on and the device unlocked to appear on the list. That’s because the Zenfone 9 was not signed into the same Google account used by the two Pixels. Once the Zenfone 9 was signed into that same account, it showed up on the Pixel 6 Pro’s Nearby Share sharing list even with the screen off and the device locked.