Sometimes your graphics tablet might be dirty causing it to malfunction while creating wavy lines. Another cause could be brush hardness; try reducing realism parameters but if these causes don’t work then upgrade your hardware instead.