Your video must meet at least the minimum quality standards for YouTube. It is unlikely to obtain the resulting material in better quality than the source (I omit the use of special filters and algorithms).
You never know how youtube will process your video if you are not a youtube partner.
Each subsequent export in most video editors causes a drop in quality from imperceptible to drastic. Much depends on the quality of the source material and then on the parameters used and the number of exports (processing).
This is similar to copying tape cassettes (VHS, cassette tapes)
The farther from the source, the more pollutants there are.
Optimally:
Source file - editing - export - sending to e.g. Youtube.
A bit worse:
Previously exported file - re-edit - re-export. Previously exported file - re-editing - re-exporting etc. = further quality drops - upload to a video service (YT) another proportional loss of quality in relation to the decrease in quality of the uploaded file.
First option is always better, but considering how bad youtube re-compresses you can get away with an intermediate very high quality export and then edit and re-export it.