What the audience sees is not always what is real. The film industry has a long history of using prosthetics for nudity. This is especially true for male actors. The use of a "merkin" for women is well-known. The male equivalent, often called a "cock sock" or a prosthetic penis, is just as common.
These prosthetics are custom-made to match the actor's skin tone and body hair. They are applied with medical-grade adhesive. The purpose is twofold. First, it protects the actor's modesty. The actor is not actually naked in the way the camera suggests. Second, it allows for a specific aesthetic. A director might want a particular look that the actor does not naturally have. The prosthetic provides that control.
There is also the "modesty pouch." This is a small, flesh-colored pouch that covers the genitals. It is used in scenes where the actor is supposed to be naked but the camera angle does not require full exposure. It is a simple, effective tool that allows the actor to feel less vulnerable while still appearing nude. The line between reality and illusion is carefully managed.