Some producers like to spend months crafting a beat, tweaking the arrangement, adding stuff and removing stuff, while others prefer to bang them out in under 10 minutes.
While there's no right or wrong way to approach the construction of a beat—nor is there a suggested amount of time a producer should spend from start to finish—it's usually best to avoid "over-producing" a record, which is the result of excessive use of audio effects and heavy layering.
"Honestly, man, this beat took me, like, 15 minutes, 20 minutes, man," 6ix told Genius for their Deconstructed series, referencing his work on Logic's "Take It Back." "There's brilliance in simplicity. You can always add a lot of stuff to a beat but if you make every sound super important to the beat, you don't need to add a lot of stuff."
Often, the amount of time a producer will spend working on any one given beat is dictated by who the beat is being crafted for or who a producer envisions will be best suited for that particular type of production. If a producer is working on a trap record for Gucci Mane, he or she probably won't spend as much time as they would if Kanye West invited them into the studio.
Frustratingly, though there is—as 6ix points out—"brilliance in simplicity," that particular approach to production happens to often also be misconstrued as "basic," a label that no creative, artist or producer, wants to be attached to their résumé.