In many cases, yes, replacing an engine will change the car’s value. Exactly how much it will affect the resale value of your car depends on who you are selling it to and what kind of engine you replace the original one with.
Typically, the original engine will be worth more than a replacement engine. Of course, a car with a replacement engine is still more valuable than a car with no engine, but it’s worth keeping in mind when shopping around for offers.