There are multiple factors that determine a dog’s temperament and breed is just one of them. Others are personality, age and experience.
Of course a one-year purebred Malinois will typically be a nervous bundle of energy and a seven-year old pug will be mostly calm and settled, but that’s just average. The former may be unusually laid-back and the latter snappy, e.g. due to bad experiences or socializing.
What I would recommend if you don’t insist on a puppy (and as cute as they are, puppies need a lot of time, energy and work), contact your local shelters and rescue organizations and tell them what you are looking for. Especially older dogs often have problems being adopted and an older dog can be a wonderful companion for someone who’s more in need of a pet that keeps loneliness at bay and encourages them to go out on little walks. (I would however be careful with these organizations that “ship” rescues across states, there are a few who are more interested in getting dogs into homes than finding a good match.)
As for breeds, note that many terriers and dachshunds were bred to hunt and act rather independently (which we perceive as pretty stubborn in our modern lives), so you need to look closely when picking small-to-medium sized dogs. On the other hand, historically some breeds were explicitly created and coveted as “companion dogs” (the kinds that you see on the lap of noble ladies in old paintings), and that is probably a good starting point in your research. Find a list of breeds in group 9 (“Companion and Toy Dogs”) of the fci’s breed list. Use that as starting point when talking to your shelter or looking for mixes.
Another thing - please note that some purebred dogs suffer from health-related issues, e.g. brachycephaly is quite common because the dogs are seen as “cuter” or more childish, so please don’t encourage this and choose either a breed that doesn’t have it or a breeder that has healthy dogs with a real snout.
In short, the best suited for your grandma would be a calm adult dog with a friendly attitude that likes to keep his or her human company. Breed is secondary, personality matters. Considering the current situation I would hesitate to choose a very old dog, but only because I would like to spare her another loss in a rather short time.