Seal bathroom sink drain to vanity/wall
You are correct that there is trim made for this, but if you've never seen one the term for it is hard to figure out...  It's called a pipe escutcheon and they come in two flavors.

If you can disconnect the pipe and slip the pipe escutcheon over the end, the single piece models look better and will seal better.  If you don't want to mess with the pipe, they also come in a "split" ring that is either two pieces, or more commonly, a hinged ring that opens up to fit around the pipe and then close back around it.

Amazon search, not responsible for search results