2003 Honda Accord ex problems. Need

Me and my dad recently bought a new engine for my 03' Accord and we installed the new engine and the car starts up but after a couple minutes of letting it run the engine will start revving and we can't figure out why. Any automotive mechanics or technicians know why this is happening and how can I fix it.

It's a vacuum leak. Check the PCV valve, hose and brake booster hose.

Cold start air bypass line has a leak

Check for trouble codes with a scan tool. Check for a vacuum leak. Clean the MAF sensor. Check for a bad idle air control valve.