Be proactive and nurture your skills outside of the lab. Think about your career options early, so you have time to build your CV. Think about what motivates you and follow what you enjoy.
I had a great time during my PhD and really enjoyed the field I worked in. However, I started to realise that I wasn’t going to achieve the impact that I had, rather naively, expected with my project and I needed something that had more interaction with people. The lab was just not the place for me.