PSP was in many ways Nintendo Switch without Nintendo games. Think of "ok but how good would br Switch without Nintendo own games?" The answer is PSP, it was mostly for players who wanted good games in portable format
DS was significantly cheaper even for developers. This was the generation where Japanese devs were struggling to catch western devs, so DS offered an opportunity to keep in the market since they couldn't develop for PS3 and Wii was... well Wii. Not everybody knew or were interested to learn how to work with crappy motion controls
This was enough to provide DS enough games. Nintendo even had the foresight on adding a dual screen to prevent their games could not be ported to PSP, it was a brilliant move that secured a more dry third part support to Playstation
Sony developers didn't know a thing about creating good portable games (or any good game for that matter but I digress). If they could at least release 3 or 4 good IPs in the same way Nintendo does I'm sure PSP could have pulled something in the 100 million and even removed for market share from Nintendo, but it's Sony we are talking about lol