I would somewhat simply break it down as such: If you have or want something less than 4 full days and/or want some additional non-Disney, non-theme park time,
Disneyland is the place for you. If you have 5+ days and only want Disney stuff, Disney World is the place for you.
Getting more "in the weeds" with the question, Disneyland is the better place if you are into the theme park experience only. Meaning all you want to do is attend the theme parks and do little else. It's just so much easier to get between parks and get to multiple attractions with minimal hassle. Average attractions are the same or better at Disneyland with a few exceptions and much more packed into the parks.
If you want the full bubble experience with good restaurants at the Disney resorts plus other activities around the property (golf, pools, mini-golf, Disney Springs, etc.) and have the time to get from point A to point B to point C, Disney World is probably your place.
I rarely have the time or choose to spend a week in Disney World (as much as I enjoy it) and find Disneyland just more fun and a better use of less days to pack more fun in. Just my 2 cents and YMMV.