To use accent color on title bar and window borders in Windows 11, navigate to Settings > Personalization > Colors, then click on the Accent Color to show more options. On the last option you can find "Show accent color on title bar and windows border" option. Set the setting to "On" to enable or "Off" to disable.
This setting will change the look of title bar and windows border.
Note: works only on compatible apps.
Without accent color
With accent color
To Enable Accent Color on Title Bar and Window Borders Through Windows Registry
Warning: Modifying the Windows Registry directly through Registry Editor (Regedit) may cause problem to Windows. Proceed with caution. Before making any registry changes, make sure that you already familiar with the basics of the Windows Registry.