Simple nudity isn't illegal in most of Europe.
Nudity + sexual context is a totally different subject, but quite a lot of european movies contain nudity, even of minors.
Sometimes you may see nudity of children at young ages like under 8~9 (or literal babies being naked in movies). It becomes a bit more controversial when you reach anything around the ages of puberty starting, which is usually 11~13.
The scene where there is full frontal nudity not being sexual lessens some of the concern here, but in many instances films that want to depict nudity/sexualisation around minors in their teens tend to use actors who are of legal age. It's not hard to make an 18 year old look a few years younger. As I mentioned earlier in this topic Julia Garner played a 15 year old in The Americans. I was convinced. She was styled both in dress and makeup/hair to look like a young teen.
Obviously teens can act in teen movies where there is romance/sex plots and topics, as well as things like underage alcohol/drug use. They do all the time. Literal full frontal nudity is a step further from the norm though.
As the scene wasn't sexualized I'm backing off a bit, but I'm not necessarily going to chastize everyone a little uncomfortable as "Americans being prude" with full nudity of a minor when the actor literally was a minor.
Movies can handle a whole range of things that are illegal/uncomfortable in real life, via acting, but ethical concerns around literal minors will always be relevant within acting. Especially when you are involving nudity/exposure on the set.