King Charles has attended church in Sandringham, waving to well-wishers ahead of hosting a big royal gathering on Christmas Day.