The command sudo zypper dist-upgrade --no-recommends (or its common shorthand sudo zypper dup --no-recommends) is the primary method for updating an openSUSE Tumbleweed system while keeping it “lean” by avoiding optional packages.
The primary difference between zypper --no-recommends and solver.onlyRequires = true in /etc/zypp/zypp.conf is the scope and persistence of the setting across different package management tools:
Recommended packages are a great feature when installing a new package. However upgrading the system with this setting enabled can result in unwanted bloat.