I think the last time I went trick or treating with my friends was when I was in my last year of high school, so about 17 years old? I didn't do it every year, but we were just kinda like hey, this is our last year as technically "kids" so let's just go for it
It's not that I think activities should be limited by age or anything, and I'm a big advocate of doing whatever you like regardless of whether people think your age range should do it or not, and this is true of things like playing video games or collecting stuffed animals, because that doesn't affect anyone else. But with something like trick or treating, I just feel like when you're older you should stop, not because it's "childish" but because houses do have a limited supply of candy they intend to hand out to children to make their night, and if a lot of adults/older teens are hitting up those houses in groups and taking from that limited supply of candy, that potentially ruins it for some younger kids.