Buying a Car with a Replaced Engine

The engine has 10,000 miles and the car had inspection on it also I test drove it and it seemed fine. It’s just idk how risky it still is. Also final price is 9k with everything included