8 – How to alter the parameters in the core.extension.yml file programatically?

I need to modify the filter_protocols parameter inside the core.extension.yml file programmatically to add a new protocol. I know how to alter a service but I don’t find any information about how to alter a parameter.

parameters:
  session.storage.options:
    gc_probability: 1
    gc_divisor: 100
    gc_maxlifetime: 200000
    cookie_lifetime: 2000000
  twig.config:
    debug: false
    auto_reload: null
    cache: true
  renderer.config:
    required_cache_contexts: ['languages:language_interface', 'theme', 'user.permissions']
    auto_placeholder_conditions:
      max-age: 0
      contexts: ['session', 'user']
      tags: []
  factory.keyvalue:
    default: keyvalue.database
  http.response.debug_cacheability_headers: false
  factory.keyvalue.expirable:
    default: keyvalue.expirable.database
  filter_protocols:
    - http
    - https
    - ftp
    - news
    - nntp
    - tel
    - telnet
    - mailto
    - irc
    - ssh
    - sftp
    - webcal
    - rtsp

I know how to do this by copying the service.yml file inside the sites/default folder but at this time I need to do this programmatically.

Any idea about how to do it?