The best way is to eat enough of protein every day. Different recommendations can be found but a very good ballpark is that you eat around 0.6-0.8g or protein per pound of your own weight.
Another and more important thing is to add a weight training regimen into your life which will help and slow down muscle loss.