About 5 months? Younger than that I just kept an eye on wake Windows, although there was obviously a bit of a pattern even when newborn in terms of wake up, nappy change, feed, sleep (awake time somewhere in the mix, gradually increasing). Honestly before then there didn't seem much point .... they weren't awake for long, particularly my boys who were premature and were sooooooo sleepy. So watching wake Windows and going with the flow just worked better until then. They were also always sleeping in the same room as me before then, so lots of napping in pram/in arms rather than in bed/cot.
My eldest I did try to get a routine in place rather earlier. I found it made bugger all difference to how she slept and was just for my sanity! It REALLY doesn't matter in the long run what you do in the early days as far as sleep/routine go. Babies are so malleable in the first 6 months that you can always make changes easily as and when you need to.
Having said that, all of mine seem to have an inbuilt "bedtime". Not that they sleep through from early or anything, but just that there has always been a time that if kept up past they will get fidgetty. 8pm for two of mine, 9.30 for the 3rd. That's a PAIN - he's one of the toddler twins and life would be ten million times simpler if they were ready for sleep at the same time. It shifts a bit with changes in napping, but surprisingly little. Eldest has had the same bedtime (for the most part) of 8.15 for more than 5 years.
Now toddlers..... They DEFINITELY need a routine in my experience as they love the security of repetition and knowing what comes next. I have read the same stories over and over and over and over..... and they always ask for the same flipping lullabys.