I’m no doctor, but I would say you’ve simply overdone it.
You were already out of breath after one length, but pushed on for another three.
Sorry, but you can’t just do that with MS - you’ve got to listen to your body.
It sounds as if you have been getting very little exercise for some time, so it’s great that you decided to try, but if you’ve been out of it for some time, you need to build up again gradually. This is true for healthy people too, but even more so with MS.
You can’t just ask your body to do something it never normally does, ignore it when it tells you it’s out of breath, and then expect everything still to be OK.
I think you should go again, but set your sights a lot lower. If you’re tired after a length, stop at that. Next time, you might manage a bit more. Eventually you might get up to and past four lengths, but I think the mistake was trying to do it on a first go, when you’re completely out of practice.