Yes, you can go to your lens and check for the filter size but what if you're away and need to buy a filter, not being sure what your lens filter size is? Not to mention, some of today's lens manufacturers have omitted writing that filter size on the front of the lens, as was customary in yesteryears.
Here are a great easy-to-find search and list of all (Almost) lenses (Thanks to Tiffen) with the right size filter they can accept and you wanted to know.
On the top blank bar, the box enters the lens brand in the right box, then the size of filter you want to buy in the last box and you will get all the lenses that use that size, or alternatively, in the middlebox right of the focal length of your lens. Very easy and efficient.
LINK
https://tiffen.com/pages/filter-to-lens-chart