It is synced from on-prem, you have to enable the archive on-prem as well and let that setting sync with this command:
Enable-Mailbox -Identity ayla@contoso.com -RemoteArchive -ArchiveDomain "archive.contoso.com"
https://learn.microsoft.com/en-us/exchange/hybrid-deployment/create-cloud-based-archive
Otherwise, if you try to enable in 365 directly, you will see this:
The following error occurred during validation in agent 'Windows LiveId Agent': 'Can't enable the archive for
'<Mailbox>' because this user object is synchronized with the on-premises directory. To enable a cloud-based archive
mailbox for this user, you must use your on-premises Exchange admin center or Exchange Management Shell.'