It depends on how you use the SPI object. If you use the SPI object directly like what Arduino Uno without creating an instance object like SPI.begin(), the SPI construct will default to the SPI to PA4 - PA7, see the default pins definition and default Class construct of Blue Pill.
For STM32 Arduino Core (Stm32duino), there are four STM32 Arduino Core specific APIs for configure the alternative SPI pins.
void setMISO(uint32_t miso)
void setMOSI(uint32_t mosi)
void setSCLK(uint32_t sclk)
void setSSEL(uint32_t ssel)
These must be called before the SPI.begin().
Another alternative way of using the alternative SPI pins is to create an SPI object and pass-in the pin assignments to create an SPI object like this:
#include <SPI.h>
SPIClass mySPI(PB5, PB4, PB3, PB15); //mosi, miso, sclk, ssel
See the alternative construct API, and further information on STM32duino wiki page.