No one says 10 pm or midnight is the evening.
See this is interesting because I use the words “evening” and “night” interchangeably. I’m from (broadly) northern Ohio.
If I’m greeting someone, “good morning” is from the time I wake up until noon, “good afternoon” from noon until the sun goes down or it’s 7pm or so, and “good evening” at any other time. It could be 3am, and if I’m meeting someone, I’d say “good evening.”
“Good night” is when you’re leaving. “Have a good night.” But night time is when it’s dark and evening is generally the same time.