Hello Sophia!
I am working on the same thing. Our Yorkie is 18 months old and came to us about a month ago. She started out barking at people who walked by our house, and at other dogs (she still does that).
I think the barking at people issue is getting better, and this is what we've been doing. Of course, we realize it's natural that dogs bark, and this is apparently especially true with Yorkies! She's a good little watchdog, too so we do want her to bark to let us know something is going on outside, but then stop. So, she barks. We let her bark a warning, check out the threat (or already know it's benign, like the guy downstairs coming home) and then I clap my hands and say, OK, that's enough. If she stops, we praise or treat her. If she doesn't stop, we say, No, that's enough. If she stops, praise or treat (our little one aims to please, so we started with treats but now mix it up).
If she doesn't stop, or, as our dog walker says, she "blows up" (as in, goes wild with barking) we clip a lead onto her collar and physically lead her in a different direction to distract her (or lead her to her spot if we're home) and as we walk away say, No. Leave it. Then when she listens, praise her. We want to break her of the habit of running to the door and barking wildly and interrupting the behavior is the only thing that has worked.
We try to maintain it consistently every time she barks. We've been doing it for about two weeks and now she stops more than half the time after 3 or 4 barks. Sometimes, I just have to clap. We rarely have to lead her away anymore, but she still has her blow ups, lol. We are also working on her reaction to seeing other dogs when we are out walking.
Anyway, I feel for you. I think there are probably lots of ways to work on this, and that being consistent is the main thing. I also read this page which has lots of good ideas for when I need to review our strategy!
ASPCA | Barking
Good luck to you!