Module installation order Within my custom module i've got an optional implementation to the dynamic entity reference module: https://www.drupal.org/project/dynamic_entity_reference

When the module exists, I add a DER field to one of my custom tables during the module installation.

The issue i am currently facing is that I can not manipulate the installation order of my module. Within the install hook of my module i am using module_set_weight("mymodule",1).
However this is not effecting the installation order at all when I run drush config-import order or drush site-install --config-dir="/my/conf".

Within my core.extensions.yml the weight got applied after config export:
drupal_content_sync: 1
For me this sounds pretty simple to solve. In your custom module just set a requirement:

name: Foo Bar
description: 'Lorem ipsum.'
package: Custom

type: module
core: '8.x'

dependencies:
  - dynamic_entity_reference:dynamic_entity_reference


By that you ensure that dynamic_entity_reference exists and is enabled when your module gets installed. That's it. Except I misunderstand you and you are instead looking for hook_module_implements_alter to change the order of modules calling a certain hook.