Good question. I think it's hard to know. When an authorized (Yanmar,
Perkins, Universal, etc.) dealer gives me a substitute part, I record that
for future reference. Otherwise, use the OEM part. I.e, Perkins oil filters
are easily twice the price of say NAPA; but, NAPA are generally quality
products and if referenced by a Perkins dealer, that's good enough for me.
My oil filter has a bypass valve that insures oil flow even if the filter
becomes clogged. Just picking a filter of the shelf that fits may not have
such a valve subjecting your engine to possibly costly repairs.
Better safe than sorry.