Put an itemframe with the item that you wish to filter on an hopper. The hopper then will only suck equal items out of the inventory above it.
You can put as many itemframes on the hopper as you wish.
When one of the itemframes is empty every other itemframe on that hopper will be ignored.
When you right click the item in the frame it will be filtered out/ignored untill you click it again.
When there is one itemframe that filters in and one that filters out the filter that filters out will be disregarded.
If you rename an item to “fuzzy” the NBT-Data of similar items in the source inventory will be ignored. (The item can be renamed in an anvil)