I was fortunate to own both an Amiga and Atari ST (not at the same time) in their late 80s heydays and I absolutely loved those machines.
The thing is both Commodore and Atari made the same mistakes and died pretty much at the same time (~ 1994).
The Amiga 1000 was ahead of its time in 1985 but Commodore tried to sell the same architecture for pretty much 7 years. The Amiga 3000 and 1200 were too little too late. By 1990 both PCs (in the affordable space) and Macs (in the unaffordable space) were ahead hardware wise. Sure, PCs were clunky but if you had a Soundblaster and a VGA card, you were ahead of an Amiga 500/600. And even the 1200 was not massively ahead of its time.
Software wise, neither Commodore nor Atari managed to convince Microsoft, Lotus, Adobe, etc. to write any software for their machines. So in the business space, it was PC or Mac. You have to give Steve Jobs credit when he negotiated with the software powerhouses of its time to have software ready by the time the Mac came out.
Sure there were some niches in graphics and video effects for the Amiga and MIDI and desktop publishing for the ST but it wasn't enough to save them.
Amiga OS was interesting but a 68000 and 512k or 1MB of Ram wasn't really enough to really take advantage of multitasking and hard drives were very costly peripherals. Sure, you could get an Amiga 2000, add more RAM and a hard drive but you then ended up in PC and Mac territory price wise.
Finally, the US market was lost pretty fast to the Amiga and ST. They resisted on some European markets but by 1992/3, it was over. I grew up in France where both the ST and Amiga were popular in the late 80s. I got my first 486 PC in 1993 because by then it's what everyone was getting.