I created this small application to make it easier to retrieve the Bundle ID of a macOS app.
Simply drag a .app file onto its icon in the Dock to display the app’s unique identifier and easily copy it to the clipboard.
The link below includes both the AppleScript source code and the compiled, ready-to-use application.
Hopefully, this can help someone.