There are three reasons to bring in an agency, and "everyone does it" is not one of them. Work through them before you start looking: the answer decides not only whether you need an agency, but what you then ask it for.
The three things you buy
Capacity. There is more work than your team can absorb, and it is temporary or unpredictable. Hiring someone for a three-month peak does not work; switching an agency on and off does.
Craft you cannot keep busy full time. A good art director, a media strategist or a technical SEO specialist needs enough work every week to stay sharp. If you do not have that volume, that person stalls with you, and after two years you employ someone who knows less than when they arrived.
An outside view. This is the least mentioned reason and often the most valuable. Anyone living with your brand daily stops seeing what a customer sees. An agency looks at dozens of brands a year and recognises patterns you cannot see because you are standing inside them.
When you are better off doing it yourself
When your work returns every week, holds few surprises and mainly needs knowledge of your own product. Running social media, sending newsletters, updating product photography: an employee learns that in a month and will then do it better than an outsider, simply because they know who to call when something goes wrong.
And when you do not yet know what you want. An agency is an expensive place to invent your strategy while the meter runs. Put that question on paper internally first, however rough.
The test that settles it fastest
Write down what you want to achieve over the next twelve months and what has to be made to get there. If you cannot produce that list, that is your first assignment, not a campaign. If the list contains work that peaks, work needing a craft you do not have in house, or work where an outside view makes the difference: you need an agency, and you already know what for.
If you cannot settle what stays inside and what goes out, that is a question about your marketing organisation rather than about agencies. IKAg maps that split with you: see Marketing organization.
Read on: what you do yourself and what you outsource and freelancer, agency or in-house hire.