Good question! The price of a new engine can vary depending on the vehicle, engine size, and whether it is new or used.
In the case of an early-2000s Corolla, a used engine should be pretty cheap and easy to come by, ranging between the $400-$700. If you know how to replace the engine yourself, then that’s all it should cost.
Good luck finding a new engine.