You can avoid installing non-required dependencies by adding the following (based on your preferences and/or use case) to a file in the /etc/apt/apt.conf.d/ directory:
Alternatively, you can do as pengaru suggested and the pass "--no-install-recommends" and/or "--no-install-suggests" parameters when installing packages, as described in the apt-get man page [0].
---
[0]: https://manpages.debian.org/buster/apt/apt-get.8.en.html