https://creatoracademy.youtube.com/page/lesson/connect-with-...
I'd guess that if the automatic comment approval system isn't immediate then YouTube shows the comment to the poster so they can validate it was submitted and they haven't made typos but other users don't see it - and when the comment is checked (~20s later) and found bad it gets deleted.