There is safe stuff dogs can have but there is also a lot of toxic stuff and things that are bad for them. Yorkies are prone to pancreatitis so you should not feed fatty foods like ham. Here is a small list from the ASPCA but there are long more detailed lists out there
People Foods to Avoid Feeding Your Pets | ASPCA