A lot of people have difficulties with putting commas in the sentences. English rules, comparing to other languages (especially Slavic) are not that strict. Yet, there are some that everybody has to know
1️⃣ INDEPENDENT CLAUSES
The rule is easy - FANBOYS. These are coordinating conjunctions before which there had to be a comma. F (for) A (and) N (nor) B (but) O (or) Y (yet) S (so).
🦉It was raining, so I took an umbrella.
2️⃣ INTRODUCTORY CLAUSE OR PHRASE
Introductory clauses or phrases are usually longer than 4 words. They often include such words as AFTER, WHILE, WHEN, ALTHOUGH, AS, IF, SINCE, BECAUSE
🦉If you are sick, you have to see a doctor.
Sometimes an introductory phrase may be an infinitive phrase or absolute phrase
🦉To cook a soup, you need to have some meat.
Also there are some introductory words: YES, HOWEVER, WELL
🦉Well, I guess he didn't mean it.
3️⃣ BETWEEN ITEMS IN A SERIES
Here it's easy: use a comma to separate the items. Don't forget about the Oxford comma (before AND)
🦉Buy milk, vegetables, and some apples.
4️⃣ NONRESTRICTIVE CLAUSE
Nonrestictive clause is not important, so it's better to put it a bit aside using commas around it
🦉Dani, whose performance is very nice, got very famous.
5️⃣ APPOSITIVE
Appositive (a noun renaming another noun) is also not important, so there should be two commas around it
🦉Raven, the poem, is one of the most prominent works of Edgar Allan Poe.
6️⃣ DIRECT ADDRESS
Here's also easy: if you are addressing, you should stress it out both in speech (use your voice) and in writing (use commas around it)
🦉No, John, I won't buy any milk.
7️⃣ DIRECT QUOTATION
Quotation (when there is a conversation) should have a comma next to it (before or after) and quotation marks
🦉John said, 'No! You have to buy that milk! With your own money!'
8️⃣ DATES, ADDRESSES, TITLES, NUMBERS
Dates - comma is usually before the year
🦉On December 30, 2021, she bought the milk.
Addresses - usually the commas are around places (city or county), but NOT around zip codes
🦉The milk was bought in Madison, USA, WS 71848.
Titles - if after a name, there should be commas around it
🦉 Sarah A., PhD, was called to present her research.
N️umbers - in long numbers a comma should separate groups of three (usually numbers that have more than 4 digits)
🦉There are 2,886,900 people living in this city.
That's it! Of course, there are some other rules you can find. But! these ones are the most important onees and obligatory to follow. I hope I made it easy:)) If you have any questions, don't hesitate to ask!