With relatives, I like to work on finding out things I want to know & they want to tell. So I stick to topics that relate to them telling me about their life & experiences either personally or with other family members.
If it's my uncle let's say, I may ask "So, Jim is the oldest, then you right?" and no joke that alone can start them going. If I have something more in mind, I may ask questions like "When Suzie was born, you were already in school then? What grade were you in? Do you remember that? Were you happy to have another sibling or kind of annoyed with it all?" It's fascinating to me to hear stories & usually these kinds of things will spill over into them telling you things they'd never think to tell you otherwise. If Jim & he are close & age & you feel a little cheeky, I may even ask if they ever dated the same girl or had a crush on the same girl, etc.
I would also suppose that since most of my family generally gets along, I am not afraid to step into too many mistakes there. I would keep in mind that if there have been rifts, you may want to be cautious on what you ask to avoid anything you know has been a problem before.
Now let's say the uncle is instead married to my aunt. I may ask how they met, their ages, how he knew her, etc. I may ask something like how old they were when they had their oldest child, then maybe respond with "So you had little Bill then & you lived where?" I just find people often do like to reminisce. I like to get to know people & although small talk is safe generally, I find it harder to actually enjoy it & ultimately I can leave an event not feeling at all like anything meaningful was said by me or to me. So that is how I learned to handle age gaps and have more meaningful conversations. I also find the same is true with kids too. I can ask my young cousin how old he was when his brother was born, how he felt about that. I can ask them if they like to ride bikes, then branch into when did they learn, who taught them, etc. What was learning like? Scary? Does their little sister know how to ride yet? Did they help teach her? Is she pretty good yet? And say an older young cousin, you can ask what they are doing these days (if you are unsure if they are in college, or just working & don't want to bring up something that could feel like pressure - such as parents want them in school, but they are declining). Then branch off from whatever answer, like what made you interested in that? How long have you been doing that? Do you like it?
When possible answer positively, simple things like "I am glad to hear you are doing well, liking your job, blah blah", anything from old stories you can say how much you enjoy the story & how great it is to hear funny things about your grandparents, aunts/uncles/parents, thank them for sharing it.
In less familial settings I would avoid personal related questions. I would stick with things that are much more formal & detached like "What sorts of hobbies do you enjoy?" That is always a good starter as most people like something, even if it's reading & then you can ask what the best book they read lately was & such. This of course also can work with family.
For anyone, avoid questions that might be upsetting without knowing it. Big ones I know right off would be things like do not ask if people have kids. If someone is trying & can't or has lost a child recently, that is a topic you never want to start. Do not ask if they intend to have children either. Maybe one partner wants to & the other doesn't, so it's a sore spot. Maybe they can't. Maybe they don't want to, but do not want to explain why & might feel like people expect an explanation. Never ask anyone ever if they are pregnant. Most of the time, if you are decently smart, you would likely not ask without a reasonable suspicion. However if you happen to be wrong it's so hurtful and if you are right, but again, they do not wish to openly discuss it, it's super awkward.
If you are told sad or bad news, respond simply. Stick to things like "I am so sorry. That must be really hard." If you feel like you need to say anything more, stick again to simple, "Have you found anything you can do that is helpful to you while you are going through it?" This can apply to deaths, losses, health issues, financial woes, breakups, you name it. Do NOT say "at least" or anything that might seem like you could be minimizing how hard it is right now, they are aware if there are any silver linings generally & pointing them out can feel like you don't think their pain is a big deal. Instead stick with kind questions that don't pry. "Have you been getting enough support? How are the kids doing with it?" That sort of thing.