Search here on 1064 and 1334 (both in the same search) to see previous discussions. Wix shows 51064 (5 just means 'Wix') for YM240, US version of YM2000. It's a common filter. If 1064 fits YM2000 then it should fit nearly all the smaller YM's as well.
1334 is similar, same interface (threads and gasket), has a larger enclosure which might mean better cooling or longer use before it plugs up. 1334 is near-universal on all Hondas so you should be able to find it anywhere. Some of the aftermarket Yanmar parts dealers call their 'unique custom filter for Yanmar' a 1334 for some reason.
There are some applications (YM2000B etc) where the 1334 is too big to fit the available space, only the little 1064 will fit.
1064 has a higher relief vave pressure. If I remember, 12 psi compared to 8 on the 1334. (It's in one of the posts that the search will bring up). I don't know how this is significant.
Me, I use the NAPA Gold 1064. After you open the box, 'Wix' is stamped on the filter cannister. I think the lesser volume is an advantage, it reduces the time before full oil pressure is reached on a cold start. (And I spin it with compresssion released to get some oil pressure, too). That's just opinion, I'm sure others have other opinions.