Why has AFP (Apple File Protocol) been disabled in OS5?!

Apparently you will need to use SMB instead then.

My Cloud OS 5: macOS Time Machine “Backup Disk Not Available” or Finder “Connection Error”
https://support-en.wd.com/app/answers/detail/a_id/32003

Apple File Protocol (AFP) is no longer supported on My Cloud OS 5 firmware 5.19.197 and higher.
For more information, please refer to My Cloud OS 5 firmware release notes

  • TimeMachine Backups must be reconfigured using Samba (SMB)
  • Connections to shares must be reconfigured using Samba (SMB)

How To Map a My Cloud or NAS Device on macOS
https://support-en.wd.com/app/answers/detail/a_id/24148

Edit to add: Unofficially and entirely at the users own risk one can try to roll back to the OS3 firmware then roll back to an earlier version of the OS5 firmware (if one can download earlier versions of the OS5 firmware earlier than 5.19.197). Some past discussion on rolling back the multi bay My Cloud models.