This is an issue caused by your leavening agents - baking soda and baking powder. Make sure you're using both, measuring accurately, and using fresh ingredients. Check their expiration dates before starting. If you substitute buttermilk with plain milk, this can also cause flat pancakes. Buttermilk contains acidity that reacts with the leavening agents to help your pancakes rise properly. Either use buttermilk or a buttermilk substitute.