I read this short novel about 20 years ago, in French, in a rather thin paperback. I think one can consider it as YA.
I am not sure the action is on Earth. I have a vague memory of Mars having been terraformed. But that might be a false memory due to conflating two different books. But even so, there is no interplanetary trip. The entire action is on the same planet (whether Earth, Mars or whatever).
What I do remember is that there is clearing in a dense forest, and in its center a house surrounded by a fence. A few teenagers (two girls and two boys, or maybe three of each gender?) do not remember ever living anywhere else. They are alone with a single adult, a middle-aged woman who is their governess and teacher. In fact, they study with computers. As a teacher she is mostly only a supervisor, checking they study regularly and take their exams. Besides her, nobody ever comes there, except for the monthly (or quaterly ?) delivery man who brings food and other commodities. They are ordered not to see him and not to be seen whenever he comes but being teenagers they of course manage to get a few glimpses.
About the fence, the governess tells them it is to protect them from the dangers of the forest. In particular, says she, there are "ogres" in the forest. That does work when they were small, but they soon stop believing in "ogres". Also, she is supposed to be a widow, her husband having been killed, when the teenagers were still kids, by the dangers of the forest (not the ogres, I think, some other lethal danger).
So, they being teenagers, there had to come a day when they decide to escape to see what is outside.
Well, they do meet a few surprises. IIRC they first find a humanoid body, naked, without external sexual organs, dead with a big hole in his body but no blood. A dead "ogre" ?
Some time later they meet more such beings, very alive. The latter try to catch the teenagers, but somehow with an attitude more protective than aggressive. But a man with a gun appears, and frightens the "ogres" away. Either he has to kill some of them, or they flee without fighting, I forgot. The teenagers are not quite sure who is friend or foe.
This becomes even more complicated when, I don't remember in which order, two more adults join the show. One is the governess, the other one is a man in a motorised wheelchair, and wearing a mask on his face. Both have weapons.
I forgot the details of the conflict that ensued, but the governess, the man with the mask and at least one (or maybe more) of the teenagers got killed in the cross-fire. At the end, the man with the gun brought the survivors to the "exterior world".
To make a (not so) long story (even) short(er) : the teenagers were not born from a woman, not even like Macduff, but grown in vats. The man with the mask was the husband of the governess. He was already a bit crazy when they started this whole business together. I am not sure who gave the gametes. But, years before the beginning of the story, he had an accident. He was terribly disfigured (hence the mask) and went completely "mad scientist". So his wife took over and kicked him out, keeping the children away from him. Alas for her, they became old enough to escape. But the "exterior world" found out about them and sent the man with the gun to bring them to a more normal life. (IMHO, they should have sent a whole patrol, their single man almost got killed, with the complicity of at least some of the teenagers who honestly believed he was their enemy.)