You can learn the recipe from Bernard. You will find it dialogue option of additional job, you will first need to do the job of dealing with some bandits and soon enough the little quest should appear.
Then you will need to return home, learn it properly from the scroll icon in your hut, and bam you can make it. Though i'll provide the recipe for you anyways if you want to do it the easy way.
Restrain potion-
1st: berry (red)
2nd: nut
3rd: nothing
4th: nut
5th: berry (red)
There is also a strong version of this you will learn from a character named Othra. Overall I recommend just trying out every option and having fun, loading saves if you don't like the outcome, and you will learn and discover more. Anyways hope this helped!