At the end of the day it will come down to your own decision and how much value you place on the car.
If the rest of the car is in good condition, the interior is clean, it is great to drive then for me (personally) I would (and did) put the effort and money in to repair.
You never know what you are going to get with a second hand engine which you still need to inspect, do compression and leak down tests, then service, completely remove your motor and swap for the new one before installing and you still don't know whether it is a ticking time bomb.
People are going to advise you to run and invest in something faster, more powerful, has more bragging rights but this is your car and your decision to make. Ask questions, do research, become informed and only then look at all your alternatives and the associated costs and risks.
The reason I rebuilt my car was it had never been in an accident, is near perfect inside, drives beautifully, handles brilliantly, I feel safe on the road and get out after a long trip without aching. Knowing I have a brand new engine, albeit in an older car is a huge comfort.
I also had to face the reality just after taking a massive COVID bath. What can I get for similar money that offers what I already have - with a bit of time and money? With a stuffed engine my car was worth maybe R15k and I could have parted it out and maybe made R75k being left with a lot of undesirable items all over the place.
I am so glad I put the effort in because I learned so much, can do anything on my own now and have a car that drives like a dream. It did take a long time, mostly because I bought parts as and when I could afford them, and I had to replace a lot of general service items at the same time, but I'm super happy.
Make your own decision based on your own needs and desires, guided by the input and knowledge of others.