You’ve posted a list of network activity, and a whole lot of network connections is utterly normal and expected and benign.
Absent direct access to your Mac, and investigating which apps are active, and then what those apps are doing, nobody can tell if that immense list is entirely benign. Which very likely is benign.
To learn more about this topic area, Beej’s guide to networking programming might help learn about sockets and the socket API, or probably better to start with an IP-focused book such as Tanenbaum’s Computer Networks book, or similar.
All modern systems and all smartphones make extensive use of network connections, too. IoT devices are a little more limited in their chatter, but those too use networking.
To learn more about macOS and iOS and iPadOS, consider acquiring the three-volume OS X Internals book by Jonathan Levin.
Next on your path toward learning about security here would be a book or some classwork on digital forensics, and on blue-teaming security concepts.
Given the reported panic, I’d expect bad or unstable or flaky hardware, or add-on apps that are problematic. Typically not caused by security too, absent background- and risks-related information about your context you shouldn't post here.
All that written, netstat on a Mac is exceeding unlikely to be relevant to an iPhone panic.
Get the iPhone hardware looked at, or the Mac hardware looked at, if it is crashing at all regularly.
iPhone, iPad, and macOS can and variously have had malware. iPhone and iPad malware has been fairly rare and targeted, based on available information. Mac malware has been a little more common, but that also tends to be folks that sought out and installed the problematic apps. Add-on security apps and related, adware, “free stuff” apps, add-on VPN apps, that sort of stuff tends to be more privacy- or stability-problematic.
If you believe you are a target for espionage-level tooling, then you really need more specialized help with your security than can be offered around here, too.