Is swimming good for cardio???

What are some ways I can make my swim session effective for weight loss?

I’ve been eating well but I’m having a hard time working out.

I love swimming so I was hoping to make it my go to..