Both my kids needed to be trained (self soothing + sleep training). I started teaching self soothing around 2-3 months, and sleep training at about 4 months (some online guides say 4-6 months). There are many methods online that you can read about:)
some can self-soothe easily..some need to be trained