The concept of "curse words" certainly exists in Tolkien's legendarium, in more than one sense.
Definition of curse
1: a prayer or invocation for harm or injury to come upon one :imprecation
2: a profane or obscene oath or word
https://www.merriam-webster.com/dictionary/curse (first two
definitions, examples removed for clarity and length)
Tolkien used "curse" in both senses, and thus direct or indirect examples of both kinds are found in The Lord of the Rings. For the first definition, one need look no further than the Dead Men of Dunharrow.
"Then Isildur said to their king: "Thou shalt be the last king. And if
the West prove mightier than thy Black Master, this curse I lay upon thee
and thy folk: to rest never until your oath is fulfilled."
- The Return of the King, Chapter 2: The Passing of the Grey Company
Isildur's curse held for over three thousand years, until Aragorn set the Dead to rest after the battle at Pelargir.
As for the second definition, specific profanities as might be used in modern cursing are not found in Tolkien's works, though he does imply that Orcs used obscene and/or profane words.
It is said that they [Orcs] had no language of their own, but took what they could of other tongues and perverted it to their own liking; yet they made only brutal jargons, scarcely sufficient even for their own needs, unless it were for curses and abuse.
-Appendix F, Part I, The Languages and Peoples of the Third Age
In fact, Tolkien actually states that he cleaned up the Orcs' language for publication.
But Orcs and Trolls spoke as they would, without love of words or things; and their language was actually more degraded and filthy than I have shown it.
-Appendix F, part II, On Translation
Various characters throughout the story are said to have used curses in the sense of profanity, including Gollum, Bill Ferny, Sam, Elfhelm, and Shagrat, as well as groups of Men and Orcs. The dialogue in these cases is not given, making them indirect examples of profanity.
"his [Gollum's] talk was constantly interrupted by curses and threats."
- The Fellowship of the Ring, Book One, Chapter 2: The Shadow of the Past
Spluttering and cursing he [Gollum] rose, and without a word or a glance at the hobbits he crawled away on all fours.
-The Two Towers, Book Four, Chapter 2: The Passage of the Marshes
He [Bill Ferny] ducked too late, and curses came from behind the hedge.
-The Fellowship of the Ring, Book One, Chapter 11: A Knife in the Dark
Sam leaped after
him, and then hearing Frodo’s cry he ran back again, weeping and cursing.
-The Fellowship of the Ring, Book Two, Chapter 4: A Journey in the Dark
Sam ran after him, cursing, but he did not go far.
-The Return of the King, Book Six, Chapter 1: The Tower of Cirith Ungol
A tall figure loomed up and stumbled over him [Merry], cursing the tree-roots.
He recognized the voice of the Marshal, Elfhelm.
-The Return of the King, Book Five, Chapter 5: The Ride of the Rohirrim
Shagrat's voice trailed off into a string of foul names and curses.
-The Return of the King, Book Six, Chapter 1: The Tower of Cirith Ungol
At once there was great jostling and cursing as each troop [of Orcs] tried to get first to the gate and the ending of their march.
-The Return of the King, Book Six, Chapter 2: The Land of Shadow
In vain men shook their fists at the pitiless foes that swarmed before
the Gate. Curses they heeded not, nor understood the tongues of western men;
crying with harsh voices like beasts and carrion-birds.
-The Return of the King, Book Five, Chapter 4: The Siege of Gondor
There is also an intermediate form of cursing in The Lord of the Rings, an informal curse (sense 1) used in the context of profanity (sense 2). It usually takes the form of "Curse _____!"
'You won’t go again, you say? Curse you, Snaga, you little maggot!'
-The Return of the King, Book Six, Chapter 1: The Tower of Cirith Ungol
'It is close on ten leagues hence to the east-shore of Anduin,' said
Mablung, ’and we seldom come so far afield. But we have a new errand on this
journey: we come to ambush the Men of Harad. Curse them! '
'Aye, curse the Southrons! ' said Damrod.
-The Two Towers, Book Four, Chapter 4: Of Herbs and Stewed Rabbit
'Wraiths!' he [Gollum] wailed. 'Wraiths on wings! The Precious is their master. They see everything, everything. Nothing can hide from them. Curse the White Face!
-The Two Towers, Book Four, Chapter 2: The Passage of the Marshes
'Curse the filth! ' he [Sam] said, and sprang after them into the darkness.
-The Two Towers, Book Four, Chapter 10: The Choices of Master Samwise
So why did Tolkien depict profanity this way? Firstly, it would not have fit with the style of The Lord of the Rings. Tolkien used a formal, slightly archaic style overall, and outright profanity would have been jarring. Secondly, The Fellowship of the Ring was first published in 1954, and profanity in published books was far less common than today. Salinger's The Catcher in the Rye, published only a few years earlier (1951) faced numerous challenges in part because of the generous use of profanity.
https://phys.org/news/2017-08-usage-words-literature-american-society.html
http://www.pbs.org/newshour/rundown/to-kill-a-mockingbird-remains-among-top-banned-classical-novels/