Chosen Solution

iPhone 8 does not recognize headphones or charger but will hold a charge when placed on wireless charger. Headphones and power cord are new and work with other devices. Charge port is not dirty since it is new. The phone does turn on when plugged in, but again, no charge and can’t use headphones.

You probably purchased a faulty charge port or was this why you changed it to start with? Other than that it could be pry damage on one or more components. I would check under magnification to see if any have been nudged or knocked off.