The diamagnetism, importantly this means repulsion of both poles simultaneously and equally (this is how you can have these magnets spin, a regular magnet repels same poles and attracts opposites, diamagnets repel both poles), is simply a characteristic of the superconductor, but it alone would just repel the object off.
Here is a timestamped link to NileRed’s YBCO video that visually describes the flux pinning:
https://m.youtube.com/watch?v=RS7gyZJg5nc&t=1887
And here’s a timestamped link to Ben Krasnow’s Applied Science YBCO video where he shows a close up of the crystal’s cross section that shows the imperfections that allow the magnetic field through for the pinning effect: