Any decent power amplifier will have a few hundredths of a percent distortion (e.g. 0.05%). Some may be in the thousandths of a percent (e.g. 0.005%). So, that is a few tens to hundreds of parts per million. Any way you look at it, it is a very small aberration compared to the signal level.
An oscilloscope front end (the analog stuff and digitizer) will certainly have much more noise and distortion than that amount. So, no matter what kind of signal analysis you do on the scope, you will not be able to directly measure the distortion from a modern amplifier using only a scope. It is not the right tool.
On the other hand, many people do use good quality computer sound cards to do this (of course most people don't use an actual separate sound "card" these days but you know what I mean). The sound card can generate the clean sine wave that goes through the DUT (Device Under Test) and can digitize its output with minimal added distortion. The actual residual distortion contributed by the sound card itself can easily be measured by connecting its output directly to its input and measuring the distortion on that. This is then the floor of the measurement... You will need to see at least 5x this amount of distortion in the DUT to have any confidence in the measurement of it. Obviously a better sound card will perform better. Various software helps to do this: TrueRTA, Rightmark RMAA, and others. While the oscilloscope has 1000x the bandwidth of the sound card, the sound card may have 1/1000 of the noise and distortion. The sound card will need some help, such as an attenuator on the input, but it can be a very cost-effective and feature-rich solution.
Dedicated test equipment also exists for this purpose. HP 339A or 8903B, Panasonic VP-7722A, anything by Audio Precision, Keithley 2015, to name a few. There are many others, old and new, with various capabilities. Some can only measure THD+N, some can also do IMD, some can do THD (ignoring/removing noise floor).