I’m afraid I’ve not paid much attention to what’s new in 6.4, but it looks like Lightbox is only available for image blocks. It might be possible to include it in your own custom block, IDK.
If a post’s excerpt that is seen in query loop includes an image block, then lightbox should be available there. (unverified)
I’m not even sure if the WP “Lightbox” is the same as the original Lokesh Dhakar Lightbox script. If it is, as long as the necessary JS and CSS is loaded onto the page, you should be able to utilize it anywhere on a page as long as the image’s anchor link HTML includes a data-lightbox
attribute value.
While it’d be ideal to use the internal WP version, we’ve always been able to use the Dhakar script by fully following the above linked instructions, but adapting for WP use, such as enqueuing the files instead of adding JS and CSS links direct to the page’s HTML.