YSK it's either "should have" or "should've". "Should of" is incorrect
Why YSK?
The first person who typed "should of" probably heard of it in real life that was meant to be "should've", they typed "should of" online and readers thought that it's grammatically correct to say "should of" which is in fact wrong and it became widespread throughout the years on Reddit.
Not wanting to be purposefully controversial, but language is a tool for communication and as long as it's understood by the target audience, then I'd say it was used effectively.
The English language doesn't have a governing body (unlike say French and Spanish) and so whatever we agree on is correct usage. "Grammatically incorrect" has long been a dog-whistle signifier for elitism (you don't have the expensive education to know what's correct) and racism (the local dialect that you speak isn't our 'prestige' version, therefore you are inferior) and I don't really like to see it. Even when those aren't your intentions when correcting people, it still rankles with me.
Not that I'd write 'should of' on my CV or anything, but it doesn't offend me any on an internet forum.
language is full of idiosyncrasies like this (my favorite is an ekename -> a nekename -> a nickname. see Wikipedia). it's perfectly conceivable that should have would be fully re-analyzed in speech like that, so the proper form of the verb to have would become of after should
While it is true that "should of" etc. can easily originate from a confusion between "'ve'" and unstressed "of", which sound identical, the statement
"Should of" is incorrect
itself is at least a bit misleading and prescriptivist in its generality.
Interestingly, there seem to be at least some native English speakers who genuinely do say "should of" (with a stressed "of") sometimes. This paper for example argues that people who say "should of" really do use a grammatical construction of the form modal verb + of + past participle. One argument the author mentions is that this would also explain the words "woulda", "coulda" and "shoulda", since "of"->"a" is quite common in general (e.g. "kind of" -> "kinda"), but "'ve"->"a" basically doesn't occur elsewhere (e.g. no one says "I'a" or "you'a" instead of "I've" or "you've"). Another is that the reverse mistake, i.e. using "'ve'" in place of "of" (e.g. "kind've"), is much rarer, which is a clear difference to e.g. the situation with "they're"/"their"/"there", where people use these words in place of the others in all combinations frequently. I recommend this blog article for a much longer discussion.
Also, whether genuine mistake (which it almost certainly is in many cases, although probably not all) or different grammatical construction, YSK that "should of" etc. didn't just become popular recently, but have been used for centuries. E.g. John Keats wrote in a letter in 1814: "Had I known of your illness I should not of written in such fiery phrase in my first Letter.". Many more examples (some older as well) can be found e.g. here or here.
TL;DR: While in many cases "should of" etc. can well be a mistake, originating from the fact that it sounds identical to "should've" when unstressed, there is some interesting linguistic evidence that at least in some dialects of English native speakers really do say "should of" etc. (i.e. in those cases it is not a mistake, merely non-standard/dialectal).
I'm guilty of should of, but I usually use shoulda as I tend to type how I talk, and my pronunciation is somewhat lazy.
However I'm of the opinion that as long as the point is gotten across, there is no wrong way to communicate. Alot of people actually say "should of" while speaking, and it only makes sense that they'd type that way, usually without a second thought till someone interrupts a discussion with grammar correction, which let's face it, brings NOTHING to the table.
should of is probably a product of phonetic typing (those who just type the letters that match the internal audio) or when siri first launched voice typing and no one bothered to check it.
Edit: Should of should've died a long time ago tbh. could do with a mini-crusade.
English contractions are very hard and I have been trying to be better at them. For other users like me who struggle with English, text generators like the ChatGPT can help a lot if you ask them to correct for you and they will give you tips. Be careful if it is online one like ChatGPT though, it isn't private!