WebDriver is good for simulating what happens inside a web browser. Step 1 is complete Selenium:
WebDriver driver = new ChromeDriver(); // open a browser
Step 2 is interacting with the application running on your operating system. Pressing F12 is an operating system action and has nothing to do with interacting with a website. You'll have to use some other tool that integrates with Selenium to do this step.
For step 3 it is not clear what 'window' you are using. If this is a window outside the browser then you cannot automate this using Selenium. You probably need to use the same tool you used in step 2.
Step 4 would be going back to calling Selenium. How you would do this manually, step by step, would determine how you do this with Selenium.
Step 5 is back to the tool you integrated with Selenium.
Step 6 appears to be like step 5. How the 'other' tool gets the Header information into your programming language would determine how you answer your question. It is also nothing to do with Selenium.