Welcome to YT, glad to have you aboard
He needs to be on a schedule to eat then out to do his business, this must be consistent no matter what weather conditions are. Feed same time every day, all dogs do not need to relieve themselves 20, or 30 minutes after they eat. So the beginning is going to be a hit and miss. After he eats wait 20 minutes then take him out on a leash, tell him what you want him to do, pee pee or poo poo what ever words you use, keep repeating and repeating and repeating until he makes what you ask of him. When he does a reward treat should be given along with lots of verbal praise.
When they are outdoors they are very distracted and yes, every blade of grass must be sniffed two and 3 times. Remember, outdoors has many great intriguing and strange smells and sounds, these yorkies have tunnel focus and selective hearing when outdoors, so it's important to keep repeating what you're outside to do. Give him time to do his sniffing and investigating, then start telling him what to do.
Even if he has made his business indoors, still take him outdoors at the scheduled time, he needs to know he goes out at a certain time. Dogs are creatures of habit, have little alarm clocks built into them, they know what time they get certain things and why scheduling is so important, rain, sleet, hail, whatever, he needs to be taken outdoors. It's never the dog that fails, it's the owners, you gotta put the time in to get the results you want.