If the engine was replaced through an official service and dealer, and the replacement was recorded somewhere, for example with an insurance company or again with the dealer, then you can find out about it through a FAXVIN VIN report. But that doesn’t happen very often. I still recommend doing a VIN report in any case, and overall, an inspection by a specialist, a mechanic, is the best way to make sure whether there was a replacement or not.