Hello @Alik Kislitsa !
Welcome to Microsoft QnA!
Federated domain in Azure Active Directory (Azure AD) is a domain that is configured to use federation technologies, such as Active Directory Federation Services (AD FS), to authenticate users.
So to sum it up you need to enable ADFS Federation Services for the second domain
This Documentation provides everything you may need :
https://learn.microsoft.com/en-us/windows-server/identity/ad-fs/ad-fs-overview
I hope this helps!
Kindly mark the answer as Accepted and Upvote in case it helped!
Regards