If they are elected at any point in the 30 days prior to death, or the day that they die, they will count towards the 2 required for a YES resolution
House & Senate
Looking at deaths back to 2006 (when average congress age reached levels similar to today) we had 28 deaths in the past 17 years. Modelling deaths as a Poisson distribution with a mean of 28/17, there is only a 49% chance of more than one death in a year. Plus we are 3% into 2023 already and no deaths, so the odds should be even lower.
Congress age over time: https://www.nbcnews.com/data-graphics/118th-congress-age-third-oldest-1789-rcna64117
@StanPinsent Congress continued getting older after 2006: https://www.businessinsider.com/congress-oldest-history-gerontocracy-lawmakers-2022-9
"old fraction" is probably a better predictor of deaths than average age.