The game has no setting to accept quests for you, but two add-ons with Forever versions do: AutoQuests and Leatrix Plus. Both accept quests when you talk to a quest giver and hand them in when they're done. Pick AutoQuests if that's all you want, or Leatrix Plus if you'd like dozens of other small switches too.

Add-on Forever version What it does
AutoQuests 3.1.0 (26 October) Only quests: accept, turn in, continue
Leatrix Plus 1.60.27-forever Quests plus faster looting, auto repair, junk selling and more

AutoQuests

From the author's GitHub page:

Command What it does
/aq Shows whether it's on
/aq on and /aq off Turns it on or off
/aq config Opens the options

Hold Shift, Ctrl or Alt while you talk to an NPC to pause it for that conversation. It also works from an NPC's chat window when several quests are offered.

Leatrix Plus

Everything in Leatrix Plus starts switched off. Open its panel with /ltp and turn on automatic quest accept and turn-in. The same panel has faster auto loot, see auto loot.

When to leave it off

Forever added and changed a lot of quests. Auto accept skips the text, and sometimes the text is how you find out where to go. If you level with Questie or a guide like RestedXP, the markers cover most of that. Quests that make you choose a reward still wait for you to pick. For more quest tools, see best quest add-ons.