By default, WordPress media library searches the title, description, and file name. The
alt text of a file is not part of the search query, though it can be very useful information when your library includes significant descriptive information about your images in that field.
This is an open issue in WordPress core, but is currently blocked by performance issues. Those issues are still valid if you’re using WP Accessibility to enable searching by alt text, so if you find that media library searching is too slow, you may wish to turn this feature off.