I’m building a custom keyboard and have 60 WS2812Bs as part of the backlighting system. I’m worried about the signal integrity as I’m using an STM32 and the max current on that pin is 25mA. Do I need to add a MOSFET to boost the signal or is connecting a 330 ohm resistor enough?
You are confusing the data input and the power supply to the WS2812.
The WS2812 (single or a chain) draws its power from the 5V connection. At full brightness a single WS2812 can draw 60 mA IIRC, so that is 1A for every 16 WS2812's! Hence it is a good idea to bypass power (and ground) of a WS2812 (or similar) LED strip with a thick wire that jumps let's say 10 LEDs.
The data input takes very little current, an STM32 or any other micro-controller can supply that with ease. As Tony mentioned, a small resistor might be good for signal integrity.
In my experience you can drive a WS2812 directly from a 3.3V CMOS output, but especially if you have a long line from your uC to the WS2812 it might be an idea to put a 3.3 V -> 5 V level shifter close to the uC (and the series resistor after the level shifter).
If STM32 has Vdd max = 3.6 and WS2812 is CMOS input rated for 3.5 to 5.3 with Vih max >= 0.7 * V+ then you need a level shifter to extend past < 30% & > 70%.
Due to mismatched impedance of interconnecting cable some ringing occurs so a series R <= cable impedance improves damping of ringing to Input. Twisted pairs might be 240 Ohms and driver might be 50 +/- 30%(?) so 180 to 220 might be ideal and 330 ohms should also work for these low(ish) clock rates.
Data can be boosted to 5V with something like an SN74HCT125 (this is a quad channel, so you could use four different pins from the SMT32 to drive 15 LEDs each).
As mentioned a resistor in the line is also considered best practice. I've found 33 to 120 ohm work best for me.
Also a good idea to put some sort of reverse current protection in as WS2812B do not like you shoving power up the ground line.
You could also use a stand alone board like a QuinLED-Dig-Uno (you can buy PCBs and the components to make yourself) to get all this, plus fuse protection from here: https://quinled.info/2018/09/15/quinled-dig-uno/
FYI: I have NO affiliation to the above. Just used them myself and also found Quin to be a good guy helping me out when I butchered my first go at wilding a soldering iron making up one of his boards.