Driving led matrix with SN74LS595N instead of SN74HC595N
STM32F103C8 is a 3.3V chip. The 74LS TTL series requires 5V. There are consequences to having a mixed voltage system that are not really worth explaining here. You should get the actual part unless you want to read and understand all the differences and make accommodations (spoiler: it will be more trouble than getting the correct parts). There are also significant differences in how the outputs work that may or may be relevant depending on the circuit.