Sega shot themselves in the foot almost half a decade prior and created the perfect shitstorm for their own console to drown in. Sega refused to let MegaDrive (Genesis) go and organically move on to the next console, instead trying to prolong its lifespan (=money) with artificial support like SegaCD and 32x, which then in turn sabotaged the Saturn. They literally dropped Saturn in stores out of the blue while still trying to push both SCD and 32x as viable purchases that same year. Naturally, the audiences were confused as to what the fuck they should be buying and why. Then, the Playstation arrived and buried Saturn hard - $299. The utter flop of Saturn made Sega skip the 5th gen, so when they were trying to come back for the 6th gen with the Dreamcast, they were now in the position of an outsider instead of the leader they used to be. Sega wasn't the cool kid anymore; Playstation was.
The hype for the PS2 was probably the greatest in all of gaming history, so trying to go up against that was already an uphill battle, but add to that also Nintendo with their Gamecube and the newly unveiled Xbox with MS's limitless money bag. Dreamcast was an obvious outsider. Since Sega missed out on that sweet mid-'90s golden age of 3D franchise making, the Dreamcast didn't have a strong library of sequels people were waiting for, while Sony and Nintendo had so many legendary 3D hits in the '90s that the new jaw-dropping graphics of the 6th gen were promising to make even better. Whereas Sega was pretty much just coasting on a few recognizable 16-bit-era franchises and a few brand-new IPs. That also made devs choose the more anticipated consoles for their new projects, skipping Dreamcast. Of course, when the PS2 came out, it was game over for everyone in town, even Nintendo, let alone Sega.
Then also you have the issue of piracy; the Dreamcast's GD-ROM notoriously had no protection, so people were just burning discs like nothing, undermining the already underwhelming sales.