I've had both, started with an 18" WSM, upgraded to a 22", sold both and made a UDS. Not much difference really. I just get bored and like to tinker. If I had to do a pro / con list it would be:
WSM
Pro: built in side door, and the 3 sections make adding coals / water easier mid cook and for travel. Lots of accessories out there
Con: I was always hesitant to do too many non bolt on mods so I didn't damage the finish or crack the porcelin
UDS:
Pro: Tons of accessories out there. Most of the manufactured UDS companies sell parts for uds. Like I've got the Hunsaker charcoal basked and grate racks.
Fun to mess around with, don't feel too concerned about drilling / cutting into. I've got numerous holes and bolts that I've tried different grate racks, air controllers, temp probes, etc. If i don't like it, just stick a SS bolt in and cover up the hole.
I got one with a removable lid and was able to fit a cheap Kettle lid on for dome shape.
Cons:
You can do a cheap and basic UDS, but likely will end up spending as much if not more over the years as a WSM tweaking and adding accessories.
Getting a good barrel and cleaning / burning it out can be a pain. Actually building the thing (although can be a pro if you enjoy it).
Harder to transport since it doesn't come apart (although I'm looking into fixing that on mine. Also cleaning out bottom is a bit more difficult since you can't remove center section.
Overall they both cook about the same, have same and interchangeable accessories. Really depends if you want an off the shelf ready to go and leave it alone cooker or like to tinker. I'd scour FB Marketplace. The WSM occasionally come up for sale around me for a decent price.
Or do like I did. Start w/ a WSM and slowly build a UDS in the background and then decide which you prefer. I ended up selling my WSM because I could get more money for them. But if I came across a great deal I'd grab another up in a heartbeat.