There are various reasons that make the time machine keeps disabling itself. Here are some steps you can try to troubleshoot and fix the issue:
1. Check if there is enough space on your backup drive: Time Machine requires enough free space on your backup drive to function properly. If your backup drive is full, Time Machine may stop backing up and disable itself.
2. Check if the backup drive is properly connected: Check the connection of your backup drive to your Mac and make sure that it is properly plugged in.
3. Check if the backup drive is formatted correctly: Time Machine requires that the backup drive is formatted as Mac APFS (thanks for the edit
@gilby101). If your backup drive is not formatted correctly, Time Machine may stop backing up and disable itself.
4. Check the Time Machine settings: Go to System Preferences > Time Machine and check the settings for Time Machine. Make sure that Time Machine is turned on and that the backup drive is selected as the backup destination.
5. Reset Time Machine: If none of the above steps work, you can try resetting Time Machine. However, this will reset Time Machine and erase all of your existing backups, so make sure to back up any important data before doing this.
If the above steps don't work, there may be a hardware issue with your backup drive. In this case, you may need to replace the drive or contact a professional for assistance.