How do I know what setSetting is suppose to be?
You can look at the source code of the corresponding field type class to get an idea of the available settings. 

target_type is something specific for an ER field

Base classes for field types provided in Drupal core

Almost all field types are derived from one of the above base classes, e.g. there are several number field types deriving from NumericItemBase

Custom field types are usually located in module_name/src/Plugin/Field/FieldType