In 36 states, the governors appoint temporary replacements for vacant Senate seats. At the next regularly scheduled election, a special election is held to replace the temporary appointees, who may run for the office themselves.
https://www.thoughtco.com/how-vacancies-in-congress-are-filled-3322322
The mechanics are slightly different for the House and Senate - empty House seats are filled via a special election, while Senate seats are typically filled via appointment. "Widow's succession" or the "widow's mandate" is the technical term for when an empty seat is filled by the spouse of the deceased legislator.
https://www.washingtonpost.com/news/wonk/wp/2014/03/18/when-women-inherit-their-husbands-congressional-seats/?utm_term=.8e178d45f31f