Failed smog test

i have a 1997 honda civic that failed smog test. i was told to change the E.R.G. valve but turns out that my car does not have an E.R.G. valve can any body help on this

You have a few letters crossed up. It’s an EGR valve, not an ERG, and your car should have one.

There’s not enough info provided as to codes, etc. but it could be assumed your car failed because of NOX.
This can be caused by a faulty EGR valve, clogged EGR passages, poorly performing engine, faulty catalytic converter, etc, etc.

This is the point where a proper diagnosis must be done instead of throwing NOX related parts at it.
You might get the car scanned for codes and post them. That will provide a starting point.
AutoZone, etc. will scan the car for free.

IIRC, the problem might not be the EGR valve itself, but the tubes from the cylinder head that feed into the EGR valve might be clogged up with carbon, which then sets off the light.

You might want to have someone try to clear the EGR passages before you start throwing expensive parts at the car.

BC.