Since the MBAir M1 ships with a 30W charger it means that your laptop may actually drain the battery slightly while using the 25W Samsung charger depending on the workload. You do need to be careful using third party chargers since there are many cheap improperly made chargers that can easily damage a Mac (especially a USB-C model). However, a Samsung OEM charger should be safe to use.
Big Sur now includes a new Battery Management feature similar to what is used by iOS mobile devices. The battery management feature will automatically exercise the battery now so you can leave the charger plugged into the laptop all the time if you want without having to worry about damaging the battery.
It is always best to use the official OEM charger (Apple in this case) when possible for the best experience.