I want to raise a dog to take care of it when I get home from work. Many people advised me to buy a dog from the time he was born over 2 months old.
I believe that you're asking what at what age is it "appropriate" to purchase a dog, and yes, your friends are right. Two months, or eight weeks is generally the suggested age.
However, if you currently work, I strongly suggest that you don't get a young dog. Not even considering their separation anxiety/them being a social animal, it's said that a puppy can only hold its pee for one hour per month of age (for example, a two month old puppy would need to pee every two hours). Consider adopting an older dog.