The oil filter must be replaced at the latest with every oil change. It filters burnt parts of the oil, metal abrasion and other dirt such as soot from the oil and thus maintains the lubrication of the machine.
A regular oil change (incl. oil filter) ensures smooth running of the engine and prevents unnecessary engine or bearing damage in the long term.