Acknowledge the situation gently and move on
If you did not know the person well, the temptation is either to pretend you did, or to apologise repeatedly for not having. Both fail. The room hears the pretence in the first case and the discomfort in the second.
Acknowledge the situation in one short, dignified sentence near the start. "I am here today because my husband asked me to speak, and because I was lucky enough to know his father in the last ten years of his life rather than the first sixty." That is enough. The room understands. You do not need to keep apologising.
Then move into what you do know. The years you had. The conversations you remember. The thing he taught you in the time you had together.
A eulogy from someone who knew the person briefly but well, told honestly, can be more moving than a long eulogy from someone who knew them all their life. Honesty is the difference.
Use the family as your source
Talk to the people who knew the person best, before you write anything. The widow. The siblings. The oldest friend. Sit with two or three of them and ask them to tell you about him.
You are not trying to gather facts for a speech. You are trying to absorb who he was. Listen for the same story being told twice. Listen for the phrase that several people use about him. Listen for the small details that only the closest people would know.
Then write the eulogy in your own voice, using the small details you have collected, attributed where appropriate. "His sister told me last week that he was the only one of the four siblings who would actually finish a crossword. I had no idea. It is exactly like him."
This works because it acknowledges that the people who knew him best are in the room, and you are speaking with their voices behind you. The room hears the family in the eulogy, even when only one person is at the lectern.
What to actually say
Speak to what you did know, with specific small details. Not general impressions.
The first time you met him. The conversation you remember. The thing he said that surprised you. The way he was at the table over Christmas dinner. The way you saw him with his children. The thing about him that was clear from the first ten minutes you ever spent in a room with him.
If you are speaking as an in-law, daughter-in-law, son-in-law, stepchild, or new partner, the angle "what I noticed about him from a slight distance" is often a real gift to the family. They have seen him from the inside their whole lives. You have the perspective they do not.
Bring that. Carefully, briefly, with respect.
A simple structure
Open by acknowledging the room and saying who you are and how you knew him.
Acknowledge briefly that you are not the one who knew him longest. One sentence.
Tell who he was, told from your angle. Three to five sentences, with concrete details from what you saw and what the family told you.
Tell one or two short specific stories. Things you saw with your own eyes, or things from the family that you have permission to share.
Close by giving him back to the family. "He was yours longer than he was mine. Thank you for sharing him with me for the time I had." Then sit down.
What to avoid
Avoid pretending you knew him better than you did. The family in the front row will hear it instantly, and so will most of the room.
Avoid leaning on generic phrases because you do not have specific stories. Specifics from a few months are better than generalities from a whole life.
Avoid making the eulogy too short out of insecurity. If the family asked you to speak, they trust your voice in this room. Three minutes from you, honest and specific, is exactly right.
Avoid attributing things to him that you have not verified. If a family member told you a story, repeat it as you heard it. Do not invent details.
How long it should be
Two to four minutes is right when you did not know the person well. About three hundred to five hundred words.
Other family members will likely speak before or after you, with the closer relationship and the longer history. Your role is the angle they cannot bring. Yours is shorter on purpose.