My guess is it was convenient to end the series then.
In 1993, Savage, then 16, and his Wonder Years co-star Jason Hervey were accused of sexual harassment in a lawsuit filed by the shows former costume designer. Monique Long alleged the young actors verbally and physically harassed her daily, with her complaints over their behavior ignored by the shows staff. That lawsuit was also settled out of court. Actress Alley Mills, who played Arnold family matriarch Norma on the show, called those allegations against Savage completely ridiculous in a 2018 interview with Yahoo! Entertainment, claiming the lawsuit prompted The Wonder Years cancellation after six seasons. I just thought this was a joke. You know, they bought her off, which really made me mad, she said of network executives decision to settle with Long. They wanted to avoid a scandal or something, but it made them look guilty. You know, you dont pay someone off when there was no crime, you just fire the girl.
https://www.rollingstone.com/tv/tv-news/fred-savage-fired-the-wonder-years-misconduct-1349495/amp/