Before you touch any clock or timing setup, go look at the transceiver chip between the STM32 and the bus. A lot of the common CAN transceivers have a standby or shutdown pin, and on several of them it floats high by default, which puts the chip to sleep. The microcontroller can transmit all day long and nothing ever reaches the wire. I lost a whole weekend to exactly that once. Check the datasheet for what that pin needs to be in normal mode, and tie it there, not left floating.
Second thing, and this one matters: the pull-up and pull-down you put on the differential lines. CAN does not work like I2C. CANH and CANL do not get individual resistors to a rail. What the bus wants is a single 120 ohm resistor across the two lines, and only at the two physical ends of the network, nowhere else. If you've got pull-ups or pull-downs hanging on those lines, they can acutally fight the transceiver and distort the signal. Go back and check what you actually placed there.
Third, the bit timing. CAN-FD runs at one speed to start a message and can switch to a much faster speed for the payload. If your starting rate or sample point doesn't match the rest of the network, you'll get silence back even though a scope shows nice clean edges. Get the exact settings from whoever runs the network, or put a scope on a frame and measure the width of the first bits to match it. One more trick: most of these chips have a loopback mode where the controller talks to itself without the pins. Turn that on in firmware. If that works, the problem is downstream of the controller, which points right back at the transceiver or how you wired it.
Solid rails rule out the boring stuff, so it's almost certainly one of the three above. My money's on the standby pin.