The A to Z of Photography: Yellow filter
https://www.techradar.com/news/the-a-to-z-of-photography-yellow-filter
The yellow filter is just one of a number of filters used extensively in black and white photography.
It might sound bizarre to use colored filters for black and white, but they control how different colors in the real world translate into shades of grey. By choosing the right filter, you can make some colors come out as a darker tone and others come out lighter, so they’re used to increase the contrast between these different colors – indeed, these are often referred to as black and white ‘contrast’ filters.