Maybe whacky maybe not

I would like to control my Cobalt8 synth with the S2400 via midi. How can I use the S2400 as a controller and sampler at the same time? Is it possible?

Yes it’s possible.
You can read the manual, watch the videos or someone may help here.

you sure can

search “midi input focus” in the manual

use 2400 pads or an external midi controller in USB host mode

you lose pitch bend & modwheel sadly (unless your synth has a second midi input, e.g XV-5080)