The Prophet Muhammad (peace be upon him) took care of his beard by frequently combing it and applying lotion to it.
This practice is documented in the Hadith, with Anas ibn Malik reporting that "God's Messenger often applied lotion to his head and frequently combed his beard." This indicates that maintaining a neat and well-groomed appearance, including the beard, was important. The application of lotion likely helped to keep the beard soft and moisturized. The frequent combing would have helped to keep it clean, untangled, and well-presented.