Quesion on SPI argument

cs  = Pin("P3", Pin.OUT_OD)
spi = SPI(2, SPI.MASTER, baudrate=115200, polarity=0, phase=1)
cs.low()
spi.send(b'5')
cs.high()

I had the above code to send a SPI message. I am using H7. What is the significance of the first parameter 2 when we call SPI. How do I know what value should be given for this parameter.

Also want to confirm the pin assignment for SPI
P0 (MOSI), P1 (MISO), P2 (SCLK), P3 (SS), Ground
Is there any other pins needed to connect?

The first parameter defines the bus. The H7 has multiple SPI buses. Only one is attached to I/O pins.

To control SS you have to define a pin yourself and toggle SS yourself. The SPI object only moves the data. It does not do chip select.