I'm admittedly not an expert here.
But I believe that youtube processes/compresses 1080p video, to the point where a 2k or 4k display on an iMac won't make a difference in "what you see".
Personal experience:
I have a 2018 Mini, and I use a Viewsonic 27" 1080p (native resolution) display.
If I watch a youtube video in 1080, it... well... looks "ok".
But...
If the same video is available in 4k and 1440p (neither of which my monitor can display, it's 1080p, right?), then I select 1440p resolution (from youtube), the video actually LOOKS BETTER. Crisper and sharper.
Perhaps with youtube "sending" at 1440p, it delivers a signal "at the user end" that is closer to the quality one would see at 1080p (with youtube's processing/compression).
So... in my estimation... the display isn't "the factor" here -- it's youtube's compression.
Hope I explained that adequately.
Now... having said all that... if it was me... I'd get the 4k iMac.
You won't regret spending the money.
Or better yet ... a 5k 27" iMac!
One other thing:
Do not, do not, DO NOT buy ANY iMac UNLESS it has an SSD inside.
This is CRITICAL.
Spend the extra money here... you will NEVER regret it.