If your engine has been well-maintained, it's better to replace the timing chain. however, if you have a poorly-maintained engine, it's sometimes better to replace the engine in case the price of a new engine doesn't exceed the price of replacing the timing chain, depending on the car model.