Technically Apple or an Apple Authorized Service Provider can install a replacement key cap, however, Apple only provide an entire set of key caps in their kit which makes it inconvenient & pricey for an AASP to replace the key caps since in my own personal experience servicing my organization's Macs, there tend to only be a few keys which are common to wear or popping off. I have never seen anyone else post that Apple or an AASP replaced a key cap (at least in recent years...perhaps due to cost as I explained, or perhaps they are not aware these key cap & scissor kits are available from Apple).
@kaz-k is correct, there are key caps available online, but you must be very careful to get the one that is compatible with your laptop's exact keyboard since there are multiple regional variations. Fortunately many of the keys for the US keyboards tend to be the same for the Late-2019+ models which utilize the newer style scissor mechanisms. I have pulled key caps from these Late-2019+ Macs and used them on Apple Silicon Macs without issues. You may still find variations in the shade or texture of the black key caps and may even see some differences in the font.
I highly recommend you have a professional perform the key cap replacement because I find it can be very difficult removing the key cap on these USB-C model Macs (older non-USB-C Apple laptops were much easier to work with the key caps, but still a bit tricky). It is very easy to damage the very tiny & fragile lugs on the scissor mechanism which hold the key cap, plus some keys have stabilizer bars which can make replacement even more difficult. Removing & installing a replacement scissor mechanism is even more difficult.