Reinvent the wheel

To spend time or resources doing something that has already been done.

To waste your time on problems that have already been solved.

Used when someone is unaware they are wasting their time. Also used as a criticism if someone believes their idea is significantly different from the prior art, and others disagree.