@Monkey Turned Wolf has hit the issue on the head. If you are self-taught, this is an example of the oft-given warning that you can hurt yourself if you do things incorrectly. This is why some of us repeatedly give the advice that you really should not be trying to figure these things out by yourself. The right way to go about it is under the guidance of a good teacher.
Yes, you can get injured training taiji. Even though it is (often, but not only) done as a slow exercise, there are issues in the movement and transitions from one posture to another that can cause injury if you are doing it incorrectly or if you don’t line up the posture reasonably accurately. Over the long-term, your knees can become seriously damaged if you never get proper instruction to clean up what you are doing.
It sounds to me like you have stumbled into this the hard way. I am sorry for your injury and hope you are able to make a full recovery. But I suspect that will not happen if you continue to try and do this on your own. You need to stop what you are doing and let your knees recover before they become seriously damaged. Then you need to find a competent instructor who can guide you through this properly. That is how you do it without injury.
I am afraid online advice, while it may be well-intentioned, can be more harmful than helpful, especially when you are already getting it wrong enough to be hurting your knees and causing them to swell up. Getting this stuff right takes direct feedback from a good teacher who can see you and evaluate what you are doing. A lot of things are subtle and can only be seen and corrected when someone is working directly with you. This cannot be corrected by reading descriptions of what you are doing, or by watching video of your performance and then trying to tell you how to fix it. And you don’t know who, in an online forum, is even skilled and competent to give you accurate advice. So don’t do it.