If you are a sewist and you don't know how to sew a button on pants then it can be shameful as it is the easiest and most important task. It is because buttons never stay on the pants permanently, and need to be sewn again. Here is a simple guide for you to help you learn this skill.
First of all, you need to gather all the important tools which will be required to sew a button on the pants. The tools you will need are small scissors, needles, and thread.
Now you need to thread the needle, make sure you feed thread all the way to the needle, and have equal ends in length. And then tie knows with its tail by wrapping it on your index finger and then gently rolling it off.
After that, you will need to locate the spot where you want to sew the button, once you have selected that spot makes sure you mark an X over there with thread. It will help you to guide your needle to the right spot.
Once you have marked the spot make sure you place the button on that spot and start sewing through its holes. The angle of your needle should be downward when sewing the second buttonhole and the needle would come from the underside of the garment.
A straight pin should be added between the button and the fabric, beneath the first stitch and button. It should be done before you continue to make any stitch, the purpose of this pin is to help you sew the button not too tightly.
After that, continue to sew the button about six more times until you are sure that the button is secure. A small button does not need a lot of stitches, but if your button is heavy make sure you add some extra stitches to secure it.
The straight pin should be pulled out when you are done with sewing the button, and the remaining thread should be wrapped around the underside of the button about six times
For tying the thread off take the needle at the back of the fabric and feed it through the stitches. Once you are done with all the work you cut the excess thread using scissors.
If you have read this guide then I am pretty sure that you will be able to sew the pants button easily without much difficulty. While sewing the button make sure you sew it tight enough that it does not fall again.