Hello and welcome.
Unfortunately, Apple's minimum supported version of macOS for iCloud no longer includes macOS 10.9.5 Mavericks. It was previously working because you were still signed in. I don't know of any way to get around it and sign back in.
System requirements for iCloud
Your MacBook Air (13-inch, Mid 2013) is officially supported through macOS 11.7.10 Big Sur. You would need to follow the steps in these articles to upgrade to Big Sur:
How to download and install macOS
Create a bootable installer for macOS
However, if the App Store isn't working or allowing you to sign in, you may need to use another Mac to create the installer. An Apple Store may be able to install Big Sur for you, but you would need to make a Genius Bar appointment to discuss it.
You can check in your Applications folder to see if there are any newer macOS installers already downloaded to your Mac.
Sorry, wish I had a better answer.
C