Linux apps are distributed in a number of ways, as is the Linux way.... Historically Debian uses DEB files and Red Hat & SUSE were the original distributions using RPM files. However now we have Flatpak, Snap and AppImage as well.
In summary Flatpak—the future of application distribution uses a sandbox approach, which means you can easily have different apps relying on different versions of the same library but all of these co-existing quite happily, see Getting Started — Flatpak documentation for an introduction.