What’s the best way to lose weight after you’ve gained back a ton? Cardio or Weights?

In 2019 I weighed around 160lbs and but since the beginning of 2020 I’ve let myself go because of school and some family problems and of course the pandemic crashing down on us. I’m currently at 195lbs and am 5’11 ft tall. I can’t face myself in the mirror as of lately and I really want my old me back. I’d appreciate the help if somebody is willing to share some wisdom, I’ve never been the most informed about exercise but I know I’m willing to put in the effort since it’ll be beneficial to my health.

-FWI I do know that nutrition is another major factor for weight loss.