Drupal module upgrade via Composer not being recognized
Do you have more than 1 copy of twig_tweak.info.yml located anywhere under Drupal root? Composer will install the module in &lt;drupalroot&gt;/modules/contrib. Installation through the UI will put modules in &lt;drupalroot&gt;/modules.
Did you originally install Twig Tweak with composer? If you originally installed the module manually/through the UI and then did a composer require, you will have two copies of the module. That won't work. You have to ensure you have one and only one copy of the module's code on your site.
The cleanest way to fix this is to uninstall the module from the UI, then remove both versions of the module code - remove both the &lt;drupalroot&gt;/modules/contrib version and the &lt;drupalroot&gt;/modules version. Then you can re-install the module using composer and re-enable it.