We could make an entire multipage article to answer this question. However, we will answer this in basic terms for right now and expand upon at a later time.
The exact impact depends on several factors that include material waste, energy consumption to produce, and recyclability. As CNC machining is a form of subtractive manufacturing, this can lead in a good amount of waste material. This becomes a challenge when that plastic material is either unrecyclable or requires a special facility to process for recycling. However, such materials count few among the several most manufacturers and designers use for their components and devices. Generally, only the most specialized applications, like those used in the International Space Station, would require a plastic material that could be difficult to recycle. 3D printing also uses materials that could provide recycling complications as well. Always investigate which plastic materials suit your needs, if only to confirm.
Yet when compared to injection molding and 3D printing, CNC machining can take less energy for production. This holds true for smaller and lower volume runs without a highly intensive upfront resourcing process as in injection molding. With injection molding, engineers need to ascertain the volume that they are expecting and ensure that they will meet the volume that can justify the cost of the mold. As mold creators make their molds from metal, they need a substantial amount of heat and energy to craft the molds to the necessary specs. Also, with the constant heating of the plastic material for molding, that would count towards injection molding's energy consumption.
What we can say is that staff need to consider their expected volume, the product's intricacies, and their expected plastic material to make an accurate conclusion about their project's expected environmental impact.