Hello there and welcome to BYC!
I get mine started early in the brooder and put small branches in there right away. Around 2 weeks of age, I put a 1x2 in there for them to roost and play on. This really helps to transition them to the coop as they learn to roost early on and you don't have to train them to roost in the coop. I have some chicks in the brooder right now that are 3 weeks old today and two nights ago, they all roosted on the bar over night.
If you haven't started them with a roost bar in the brooder and they are out in the coop, you can either let them figure it out themselves or when you go out at night to close them in, get them up on the bar. They may keep jumping down, but keep doing this in the dark for a few nights and they will eventually get the hint.
Close off all nest boxes so they can't sleep in the boxes instead of roosting on the bar.
Good luck with your chicks and welcome to our flock!