All of the M series Macs are insanely powerful. The problems people experience are almost always because of incompatible 3rd party plugins, bad drivers for interfaces, shady hubs, wrongly formatted SSD's connected, people trying to save projects to the cloud and other unrealistic crazy stuff.
To troubleshoot: start up Logic without any plugins (google it) and disconnect all peripherals. Try connecting suff. See if it's ok. If all good, try to disable plugins. Try disabling first half then the second half of them. Narrow it down. Plenty of info on these here in the forum. Do a search. Good luck!