In Pro, go to Content → Image Titles & Categories. You can enter one Media Library category label per selected image, or use Per-image details to attach labels to a specific attachment ID. Per-image details are safer when images may be rearranged.
Multiple categories can be supplied in a field with the vertical-bar separator, for example Portraits|Social Campaigns.
Then enable category filters under Content → Filter Categories. Use Style → Category Badges for badge position, colors, size, transparency, padding and typography.
When an image has no category, it will not match a named category filter unless you explicitly assign one or configure a fallback.