You can improve the performance by following these tips:
- Place your router closer to both devices.
 - Keep the local network from being overloaded.
 - If your router supports two networks (2.4 GHz and 5 GHz), ensure that both the iPhone and the Cast device are on the same band. 5 GHz is preferred.