Your engine is worn and leaking. Your piston rings are worn and shot.
Should I repair the engine or replace it?
How do I know if the piston rings are bad? Power. Low power and you can look at the exhaust for white smoke.
If performance is falling down, you will need to do expensive repair.
If the repair is extensive, it might be best to get a brand new engine.
You could save some money by purchasing a rebuilt engine — they typically run like new and comes with a warranty. Just because it’s rebuilt doesn’t mean the remanufactured parts won’t operate like new.