It's a very good idea to one or even several internships during your PhD.
- in a company (eg Zimin at Google, or Javier at Meta)
- in a lab (eg Ye at PoluY, Kashayar at ETH)
If you're paid by the company / lab, you take a leave of absence. This decreases your TA duties accordingly. See with HR.
If you keep your full PhD salary (only for the academic lab case), you prepare a URA contract.