If you want to lose weight, you should do aerobic exercise, such as running instead of swimming. Only aerobic exercise can lose weight.
I suggest you do aerobic exercise first, and then start to exercise your muscles when you lose some weight, and at the same time keep an appropriate amount of aerobic exercise, so that you can shape your body, not only thin, but also slim!