They were screwed before the CD32 wasting their money on many pointless Commodore variants. C16, C128, Plus 4, CDTV, A600 and so on.
They had the most popular 8 bit computer and then the most advanced 16 bit with the A500 but the people running Commodore really didn't have a clue with what they were doing. With better leadership we could all be using Commodores to this day.
and a proper windows style OS before microsoft.
Microsoft actually approached Commodore to provide the operating system for the Amiga. I can't remember the exact reason why Commodore turned them down but it was money related.
The lack of DOS and Microsoft Word and what have you is one of the reasons for Commodores failure to establish itself in the business market, which was its main target.
The A500 turned out to be a great games machine but the American management just could not see that. Luckily the UK office saw the potential and marketed the Amiga for playing games where it went on to be a great success in the UK and Europe.