How to query for custom field within Gutenberg block from outside of that post? [closed]

This is a bit of a work around, but you could create a Post Meta Block with the Block API, which simply sets a post meta value for a post.
Then you could add this block every time you add your ACF custom block, enabling you to query all posts with the ACF custom block.

This tutorial is a great place to start: https://wordpress.org/gutenberg/handbook/designers-developers/developers/tutorials/metabox/meta-block-1-intro/

Edit: You could also add an ACF-Field on post_type level, which is a lot easier. Set it to not allow null and it wouldn’t be possible to forget this field.