Yes. It works fine. From Apple site: https://support.apple.com/en-us/HT201700
If your Mac uses USB-C to charge, you can charge your Mac laptop with any USB-C power adapter or display.
For the best charging experience, you should use a power adapter or display that provides at least the minimum wattage of the power adapter included with your MacBook Air, MacBook Pro, or MacBook.
You can check your Macbook charger. It support output 20V-1.5A or 9V-3A or 5V-3A.
I tested my Macbook Air M1 with the charger 5V-3.1A.