Just wire neurons (human or otherwise) to computers, and see what happens.
https://www.abc.net.au/news/science/2025-03-05/cortical-labs...
Unfortunately, it's not that easy. Axon terminals of neurons release neurotransmitters. We know of dozens of different types, but are not certain that we know about all of them yet. The same synapse can release multiple different neurotransmitters too, with one or more released depending on the axonic signals. And what to these chemicals do? It depends! There are receptors on the post-synaptic cell that respond to neurotransmitters, but there can be multiple different receptors that respond differently to the same neurotransmitter. Again, we aren't sure we know about all of them. The post-synaptic neuron is probably also listening to neurons of other types that signal using different neurotransmitters that it uses to determine if it should transmit an action potential or not. Oh, and invertebrates (like nematodes) send graded potentials (not action potentials like us vertebrates usually do) where the signal strength can vary.
In short - we are a long way from being able to simulate a nervous system. Our knowledge of neuronal biochemistry is not there yet.