The Prophet (ﷺ) said: Knowledge has three categories; anything else is extra; a precise verse, or an established sunnah (practice), or a firm obligatory duty.
Sunan Abi Dawud Book 19, Hadith 1