Try exporting the original edited 4k H264 material from a 4k timeline in FCP using these settings: File>Share>Export File>Settings:
Format: Computer
Video Codec: H.264 Better Quality
Resolution: 3840 x 2160
Normally that will produce fairly good quality on Youtube, Vimeo, etc -- if viewed in 4k on a connection with good bandwidth.
Whether you create optimized or proxy media in FCP, that should have no effect on the exported quality. However if you use proxies, do not export with the viewer in proxy mode. It should be View>Optimized/Original.
Compare the exported file using the above settings when viewed in Quicktime Player to the original file as viewed in Quicktime Player. Comparing the exported file to something uploaded to Youtube or other services can be misleading because that is re-transcoded by their cloud software. Every transcode causes "generational quality loss", especially if transcoding from one highly compressed codec to another.
E.g, if you transcode from 4k H264 to 4k H264, then transcode that output to another 4k H264 codec, that is two generations of quality loss. The quality loss is much worse for H264 or HEVC than for ProRes 422.
It is for that reason my team uses a DJI Inspire 2 and we record in ProRes 422HQ. The new Mavic 3 Cine can also record in that format. However if you export using the above-mentioned settings, the result after uploading to Youtube or Vimeo is normally (but not always) OK.
Another problem is evaluating screen caps of that video, especially after upload to Youtube, etc. The default Mac screen cap format is JPG, which itself is a recompressed transcode. Then when you upload that image to many web forums, they will again transcode, recompress and downsize that JPG image to another JPG image, further degrading the image used for assessment. So it's possible a posted screen cap may have 4 generations of quality loss: (1) Export from FCP to H264, (2) Upload to Youtube and reencode (3) 4k screen cap to JPG during streaming playback (4) Upload to web forum which re-encodes to another JPG. Each of those are H264 (or equivalent) re-encodes. Each one can entail quality loss.
If you Google "mac screenshot format", you will see instructions on how to change the default Mac capture format to PNG or TIFF. Those are better formats for comparison, but they are often too large to upload to web forums. Some photo forums like Smugmug will accept PNG which is better than JPG. If the web forum allows posting a URL to a full-res PNG screen capture, that is a better yardstick for comparison.