Would I swap avast free for Windows Defender from Microsoft, no thanks.
I don't know exactly what functions are included in its Ransomware option. That is only one function you also have to consider the rest of its protection Vs what you get with avast free. The Behaviour Shield by its nature could also detect ransomware attacks.
One thing that everyone should have (and it has nothing to do with what AV you have) is a robust backup and recovery strategy to be able to recover from a serious problem, not necessarily AV related. I use hard drive imaging software, that creates an exact image of a hard drive/partition, etc. You can do a full backup, incremental backup, preferably to an external hard drive.
I do a weekly full backup and keep the last 6 backup images. If I experience a problem that is likely to take longer than 20-30 minutes, then it is quicker to restore the last backup image. I have done this many times over the years and not one instance has been because of malware, etc.