Raspberry Pi computes data and produces valuable outputs, and controls components in a system based on the outcome of its computation, on the other hand Arduino is designed to control the electrical components connected to the circuit board in a system.
The selection between the two depends on the type or the amount of data you want to capture. For instance, if the data is in high quantity and need ample amount of computation then you must go for Raspberry Pi. You will get the benefit of high RAM (512MB to 1 GB), high processing power (above 1 GHz), with a not much significant cost.
Depending on the computational cost, if the computations required by the system can be accommodated by a microcontroller processor, then there is no need to use a minicomputer such as Raspy or Jetson. I found a lot of research that uses a microcontroller + minicomputer or just a minicomputer, and actually it's enough just to use a microcontroller. It's like lifting gravel using an excavator