At the moment, I am making a map and eventually I want the player to only craft a certain item and disable them from crafting anything else possible. If I can't find a solution, I'll just make a villager to trade the crafting items. Please help! (I think you can somehow do this with knowledge books but I don't know how if that is the case)
You can set the gamerule
/gamerule doLimitedCrafting true
That prevents everyone from crafting anything for which they haven't unlocked the recipe yet.
To allow them everything by default, do this:
/recipe give @a *
Then take away all the recipes you want to become impossible:
/recipe take @a <name>
<name> being the recipe's name, which you can easily get with autocomplete.