A new community flag is proudly flying from the tower of a historic South Lanarkshire church.