The mention of the eDP (Embedded Display Port) cable is a solid idea. But in the case that doesn’t fix it, here’s some additional details about how these components work. The eDP cable rarely goes bad in my experience, but it’s worth a try in this case since the alternatives will be more expensive or more difficult.
The Camera and Ambient Light Sensor utilize the same power rail coming off the Logic Board. It travels through the eDP cable, to the T-Con (Timing Control) board. This then distributes signals is to display parts via 4 flex ribbon cables. One of these is dedicated to your non-functioning components. This leaves a few potential points of failure.
In addition to the already mentioned eDP cable, it could be the ribbon cable coming from the display to the T-Con board (highlighted in green on the attached images). Inspect closely for signs of damage or liquid, it may have small tears or punctures from debris getting into the display hinge. If this cable is damaged, you’ll likely need to replace the whole display assembly. Repairing or replacing the cable alone is tricky since it runs behind the display panel, which is a bear to remove.
It might also be the Logic board itself. It is not uncommon for a fault on the T-Con board to blow out a small logic board component, severing the power line for these two component. No power means they can’t turn on, or be detected by the MacBook.