Overview
I investigated how to get the name of a mesh clicked in Babylon.js, as shown below.

I referenced the following tutorial.
The demo page is as follows.
https://nakamura196.github.io/nuxt3-babylonjs/8/
The source code for the page is as follows.
https://github.com/nakamura196/nuxt3-babylonjs/blob/main/pages/8/index.vue
Implementation
In the following section, a callback variable is passed to createScene. The name fpsCallback might need to be revised.
Then, in the createScene function, the result of onPointerDown is passed.
Summary
There may be better implementation methods, but I hope this is helpful.