How to add file extensions while creating a field (type file) through the module installer.yaml?
Really, that's a task for the Features module. And even if you decide against fully using Features in the end, you could at least use it locally to export your content type and fields and see in the resulting installer files how the allowed file extensions needs to be defined in your own module then. As Features exports its config into ready-made modules. But going for fully using Features also will enable you to constantly sync certain config (content types, fields, image styles etc.) pretty easily across all your multisite instances. 


Take one of your multisite instances where you have the content type like you want it to be on all other sites.
Go through Features' UI and create a features module from it (that's called "package", usually that goes under /modules/features/my_package).
Activate the resulting package (module) on all other instances.




Leaving the Features module and your package module activated on all instances now allows you to sync all following changes to your content type by a certain set of commands:

# In the site_foo instance export changes into its package module.
drush -y features:export my_package -l site_foo

# In the site_bar instance import the changes.
drush -y features:import:all --bundle my_bundle -l site_bar

# In the end export config as usual.
drush -y config:export -l site_foo
drush -y config:export -l site_bar




To have a file field install sample yaml:

langcode: en
status: true
dependencies:
  config:
    - field.storage.paragraph.field_dlbox_files
    - paragraphs.paragraphs_type.dlbox
  module:
    - file
id: paragraph.dlbox.field_dlbox_files
field_name: field_dlbox_files
entity_type: paragraph
bundle: dlbox
label: Files
description: ''
required: false
translatable: true
default_value: {  }
default_value_callback: ''
settings:
  file_directory: paragraphs/dlboxfiles
  file_extensions: 'pdf doc docx'
  max_filesize: ''
  description_field: true
  handler: 'default:file'
  handler_settings: {  }
field_type: file