COM port numbering is local and doesn't matter. You can use whatever (local) COM port is appropriate for your serial device.
As for what went wrong, the cable you bought is for Cisco compatible console connections. The Sonicwall uses the same physical RJ45 (8P8C) connector as the Cisco, but it is wired differently.
What I've done, since I do this often enough to have to keep one handy.... I bought a generic serial adapter, something like this: https://www.amazon.com/dp/B00425S1H8/ (mine is a "different brand" but these are chinese knockoff adapters that are relatively cheap, mine has the same housing and everything but a different branding - can't tell you what it is, because it's been worn off for a long time). These are fine for connecting for short periods of time, I wouldn't rely on it for any long-term use (more than an hour or so of being connected), as they seem to malfunction after a while, and you need to disconnect them for a bit, let them cool off and reconnect them to get them working. If you're doing anything permenant installed, I would suggest either a keyspan adapter ( https://www.amazon.com/dp/B07GXBVDNM ) or something like a get-console airconsole with an adapter for the Sonicwall (since they're all pinned for Cisco). Either of those will be good for a long-term connection. You really just want something with a proper chipset for it. Since I carry a DB9 to USB adapter, I just carry a Cisco compatible console cable and a Sonicwall compatible one, and use whichever I need, when I need it...
you can also just make an adapter with an RJ45 cable and a keystone style jack, and RJ45 crimped end, to rewire the Sonicwall to the Cisco pinout and connect your existing cable.
The pinouts are easily google-able so I'll let you do that part. if you have RJ45 ends (both male and female) and both a crimper and punchdown tool (or honestly, a pair of scissors and a flathead screwdriver can be your punchdown tool), you can probably jerry rig an adapter with minimal effort.
All the best.