If you are primarily a poet, short story writer, or essayist, for example, you will not need and likely could not secure, or, for that matter, benefit from the services of a literary agent. That is especially true for submitting work to magazines. If you have a novel or book-length nonfiction work, you might find an agent if you already have a wide following on social media and the book has commercial promise.
If so, check online with Publishers Marketplace, Poets & Writers guide, https://www.pw.org/literary_agents or any other of many good websites on the topic.
One tip: A first-time author I know went to a writers conference in New York, where she participated in something called “Speed dating with agents,” where she was asked to pitch her book to several agents in five-minutes intervals each, and two or three agents asked for follow-up meetings.
One more tip: I have known several literary agents and offer two points:
* An agent in New York liked my own book of essays very much, and wrote glowing letters to me; but he would not represent me because the book simply had no commercial value. So it goes in the real world.
* Two other literary agents said often in lectures that they wanted query letters from the writers about their books. This was useful because, they said, “If you can’t write a letter, you can’t write a book.”
—Robert Stewart