What I mean by "quality loss" is "any information at all is lost from the video file" but it's possible that what you mean when you talk about "quality loss" is "I personally can't visually tell the difference on my equipment after recompression." (Note that you may have better equipment in the future, and if you throw away information from the video now, you may wind up regretting it later when you try to watch the same file on a better screen. However, what you mean, exactly, by "quality" may be different from what I mean by the word, or what other people in the sub mean by the word.
(This is not quite true - there are some choices you can make that are better than others H265 generally compresses better than H264, for instance - but these tend to pay off the most, and most effectively, when you're initially preparing the video from its initial source, and pay off less, and much less effectively, if you're reworking video that has already been compressed with any kind of lossy compression, which is basically every video you're going to encounter in the wild, lossy compression being vastly more effective than lossless on video files in general.) If you want a smaller video size, the tradeoff you have to make is accepting a lower quality. If you want more quality, you're more or less going to need to accept a larger video size. You can trade one for the other, but the extent to which you can try to optimize both at once is pretty limited.
Quality and video size are antithetical goals.
That's not universally true - some people just distribute videos straight off of their digital camera, for instance, and digital cameras are notoriously bad for not compressing video very well and there are other reasons why people might distribute videos that have been compressed inefficiently, such as not knowing how to recompress, or just not caring about file size - but as a rule, most people distributing videos make at least some effort to compress them as well as possible. Much more often than not, if the videos could have been distributed in a smaller file size without sacrificing quality in the first place, they would have been.