If you are participating in a program or a community with a regular paid subscription and need to update your credit card details, you can do so inside the program/community space.
Navigate to the program/community space in question and click on the button with the three vertical dots (see the screenshot). Inside the menu, click on Payments. An option to uodate payment method will appear.