It's likely that there are several reasons why your grandmother doesn't have much appetite. Medications, lack of activity, being frail, feeling sad, changing taste buds, stomach upset, can all compound each other. Being poorly nourished can cause lack of appetite too, so not eating well becomes a vicious cycle. Trying to coax her to eat will take some experimenting and patience.
You could try to make sure that she gets outside for a short walk each day. Start slowly; maybe 5 or 10 minutes each day if she hasn't been walking lately.
Try to get her to help you cook. Plan meals, shop with you if she is able, do the prep work and clean up. Chat with her as you two prepare meals together.
Here are some foods that can help add weight and are also very nutritious, and I'm assuming that your grandmother has no food allergies:
Peanut butter; on bread, toast, crackers (pb and graham crackers, my favorite), and on fruit-like bananas, apples, or pears. You can add peanut butter to milkshakes too; one or two tablespoons of peanut butter per milkshake.
Eggs: scrambled, omelettes, hard boiled, you can add extra egg whites to a regular omellete or scrambled eggs; add a whipped egg to chicken soup...like egg drop soup. Make an egg salad that can be spread on a sandwich, on a cracker, or served with tomatoes.
Small servings of oatmeal; a bit of milk, a bit of brown sugar and a few blueberries or chopped apples or pears. Oatmeal and apple sauce works well too.
Sweet potaoes: bake a sweet potato; serve about 1/4 at a time. You can mash baked sweet potatoes; use milk or a tiny bit of orange juice and a bit of butter.
Try to use whole grain foods whenever possible; whole grain breads, pastas, crackers etc have more nutrients and so your grandma will get more nutrition from eating small amounts.
Try baking together: zucchini bread, carrot cake, mini blueberry muffins, gingerbread, etc.