A plumber is not an electrician. All electrical connections are to be performed within an approved enclosure so the appropriate enclosure should have been already present for the plumber to reuse. I anticipate the protruding threaded nipple maybe removed from the well cap and replaced with an appropriate raintight pulling elbow similar to shown in the link, which will enclose the wiring connection. Utilizing appropriate connectors, the elbow should attach directly to the exsisting electrical conduit and to the well cap to prevent water and insect entry.
https://www.bptfittings.com/store/conduit-bodies.html#product-popup-details-2638
Although those visible connections are above the water line, a well casing is a humid area and so those unsealed connections will be prone to corrosion. There are watertight connection kits available for well applications which if you had utilized the services of a well pump installer, likely would have been utilized both at the top of the casing and the pump wiring connection just above the pump, fully submerged in the well water.
If the white capped protrusion is a vent, small slots or holes for air to enter/exit should be visible. Your last photo shows it connected close to the center of the well cap, but the previous photo, seems to show it located farther from center, close to or outside of the well cap diameter.