The usual approach would be to take the story out of the sprint.
However, it is worth considering:
- Can the work that needs to be done by the other team be brought in to this this team?
- Alternatively, can the story be handed over to the other team, so that they complete it as a part of completing the dependency?
I would also expect this issue to be raised and discussed at the team's retrospective.
Many of the guides on story writing (such as INVEST) suggest that stories are made independent, i.e. they do not depend on other work to be completed outside of the story. It would be worth considering adopting this approach in the future to reduce the risk of this kind of disruption.
If this is already your approach, but a mistake was made to miss the dependency, then it is still worth discussing this in your retrospective. Can this problem be avoided in the future?