When is it better to use visibility: hidden?

That is what I took from it as well.

you can use for modal pusposes.

That said, neither option is accessible to most screen readers

Can’t media queries be used to prevent screen readers from reading certain pieces of text on a web page?

Possibly yes, but the bigger question is, why hide text from a screen reader? Search engines frown on that sort thing.