The secret is to make the environment where your parakeet sleeps completely dark - and I mean like that total darkness where it feels like you're in a cave. Artificial light, even a dim lamp or that glow from your phone, activates their activity cycle. My parakeet did exactly that - it would screech like crazy whenever we turned on the TV in the next room, because even with the door closed the light seeped in underneath. When I started putting a dark cover over the cage (like a really thick cloth) after 8 PM, the noise dropped drastically. The bird can finally process that it's time to rest.
Besides darkness, check if there's any disturbing sound stimulus - car horn outside, the fridge kicking in, someone in the house awake moving things around. Parakeets are really sensitive to noises during this period because their alert instinct is on edge. And another important thing: if it's in a room that gets too hot at night, that messes with its behavior too. Try to keep the place cool and quiet, seriously - nothing like a speaker, video game, or that kind of stuff running in the same room.
If after a couple weeks of darkness and quiet your bird keeps making that racket, then it's worth thinking about other things - like if it's in pain, limping, or if there's another bird nearby that's stressing it out. But 90% of the time it's really just the lack of a signal that says "okay, it's actually nighttime now," you know?