What cookies and local storage do
A cookie is a small value stored by a browser and sent with relevant website requests. Local storage keeps values in the browser for use by the PHP website. These technologies can maintain a session, remember a preference, store consent choices and help diagnose how the service performs.
They cannot by themselves read arbitrary files from your computer. Their impact depends on what data the website places in them and which parties can receive that data.