The US Open is Rybakina's last real chance to claim the #1 ranking. After the US Open, she has a boatload of points to defend. Conversely, Mirra Andreeva has almost nothing to defend post-US Open.
Rybakina gains the #1 ranking if she makes it to at least the semifinals or Sabalenka does not win the US Open.