Hi Qazik,
OSPF domain IDs are used in VPN scenarios.
When the domain ID is the same as the local domain ID, Type 3 LSAs are generated for Type 1, Type 2, and Type 3 LSAs. Type 5 and Type 7 LSAs are generated for Type 5 and Type 7 LSAs (depending on the area type).
If the domain ID is different from the local domain ID, Type 5 or Type 7 LSAs are generated for Type 1, Type 2, and Type 3 LSAs (depending on the area type). Type 5 and Type 7 LSAs are generated for Type 5 and Type 7 LSAs (depending on the area type).
When advertising remote routes to CE switches, PE switches need to advertise Type 3 LSAs or Type 5 LSAs to CE switches based on domain identifiers. If the local domain ID is the same as or compatible with the remote domain ID carried in the BGP routing information, Type 3 routes are advertised. Otherwise, Type 5 routes are advertised.
I hope it helps!