Hello Maka1307,
To help us better assist you, can you confirm if the "Invitation Expired" error appears immediately after selecting the invitation?
This link explains how to accept or declined an invitation to join a family, and may be helpful: Set up Family Sharing
Join a family group
Accept or decline an invitation to join a family directly from your device. You'll get an invitation by email or in a text message. Then you can respond right from the invitation. If you miss the email or text invitation, use the steps below to respond from your device. You can be a part of only one family at a time.
On your iPhone, iPad, or iPod touch
1. Go to Settings.
2. Tap your name.
3. Tap Invitations.
To accept an invitation, follow the onscreen instructions. When you join a family, you might be asked to confirm your account information and to opt in to any features or services your family set up.
If you're unable to decline the invitation using the process outlined in the above link, does the issue continue after restarting your device? We ask as restarting can sometimes help resolved unexpected behaviors.
For help restarting your device, please check out this link for the process on how to correctly restart your iPhone model: Restart your iPhone
How to restart your iPhone 6, 7, 8, or SE (2nd or 3rd generation)
1. Press and hold the side button until the power-off slider appears.
2. Drag the slider, then wait 30 seconds for your device to turn off. If your device is frozen or unresponsive, force restart your device.
3. To turn your device back on, press and hold the side button until you see the Apple logo.
Thanks!