You need to configure AD sites/subnets to reflect your network environment. Details at https://learn.microsoft.com/en-us/windows-server/identity/ad-ds/plan/creating-a-site-design and https://www.techcrafters.com/portal/en/kb/articles/setup-ad-sites-and-subnets#Creating_a_New_Site
If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.
hth
Marcin