Your not a bad mommy. You tried your best you just don't have all the proper tools and techniques yet but you'll get it down.
Make sure you are using a good shampoo and conditioner. My groomer told me let conditioner to set for a good 8 minutes before rinsing. This gives it time to soak into the coat and skin for a proper conditioning. Trust me it does make a huge difference. After doing this routinely I was able to go a week without brushing/combing and their hair would still be knot free.
I use a pin brush and comb. Never use a slicker brush on a yorkie it damages the hair and skin.
I will first brush them out, this will remove the tangles. But it is very important to follow up with a comb as the comb will catch any knots, matts, or tangles that the brush didn't catch. Make sure you lift up the hair to look for any knots or matts that could be concealed. When your done the comb should be able to glide through every bit of hair without getting caught.
I use a madan brush and comb that we got from Jenny and they work great.
And remember don't brush a dry coat. Wet it down with a conditioning spray or some conditioner mixed with water. Brushing a dry coat will break the hair leading to more matting and knotting.