Sega's main issue that brought them to a fast demise after briefly tasting success in the console market was rooted back on their arcade origin (attitude to release a bunch of hardware and copy what's successful) and how they lacked the vision to manage the MD success and growing it to make the whole company stronger and capable to weather through less fortunate times
Instead of building a solid foundation and creating a strong in-house stable of IPs, they kept competing for market share by sticking to the wall every possible hardware and software projects in the hope some worked and stole some market share from Nintendo (one of lesser cited example is the Terra Drive which was a big money pit).
Sega always had the inferiority complex typical of underdogs.
When events started gone wrong, Sega bad habits that started during the MD days placed them in an unfavourable position with a more expensive hardware that was less performing in what was the new hotness department at the time (polygonal graphics) and with a shaking financial status despite the popularity of their previous console.
Even worse Sony had from the start the plan to trigger a price war (dropping the price on PS1 hardware as fast as possible) which bleed Sega dry.
Nintendo could compete in the price war despite a more advanced feature set offered by the 3D capabilities of their console because Nintendo was always smarter than Sega and tried to cut the corner as much as possible to be profitable on day one from the hardware:
With Dreamcast, Sega corrected many of the mistake incurred with the Saturn however they made the same old mistake to be way to aggressive from day one (read by using an aggressive loss leading strategy) in an attempt to gain market share before the other competitors.
The problem was that, even if the launch in America was the most successful ever at the time, the sales diminished a lot in the subsequent months.
Even with a full 12 month period (in contrast to just 4 months in 1999) and with a heafty price cut (to $149) and other promotions in US DC sold less in 2000 than what it did in 1999.
In the meanwhile Sega was sustaining tremendous losses in the attempt to gain market share (with borrowed money).
In the end Dreamcast was a financial disaster even worse than the Saturn despite the console design being better.
Here DC hardware and software shipment for each fiscal year that show how desperate the situation really was:
DC software shipment sales for fiscal year:
FY ending March 1999: 3.01M <- DC launch in Japan
FY ending March 2000: 26.04M <- DC launch in America and Europe (PS2 launched in Japan)
FY ending March 2001: 23.87M <- DC first full fiscal year of availability worldwide which got results worse than the previous one (PS2 launched in America and Europe)
Half FY ending March 2002: 3.03M <- DC discontinued
DC hardware shipment sales for fiscal year:
FY ending March 1999: 0.90M <- DC launch in Japan
FY ending March 2000: 3.91M <- DC launch in America and Europe (PS2 launched in Japan)
FY ending March 2001: 3.39M <- DC first full fiscal year of availability worldwide which got results worse than the previous one (PS2 launched in America and Europe)
Half FY ending March 2002: 0.66M <- DC discontinued
FY ending March 2002: 0.93M <- DC discontinued (Gamecube and Xbox launched in Japan, America and Europe)