If you downloaded the Companion app and ran it, it is expecting a code from the app inventor ide.
When you have created a project, choose Connect, then AI Companion from the menu.
You will see the six-character code displayed.
You can type that code manually into the companion app on the device or just point the rear camera to the barcode and it will scan the code for you.