How to preserve cookies for web based automation?


I’m wondering if I would be able to preserve session data between robot executions. I’m assuming that session data for most pages is stored within cookies. From what I’ve read about avaiable libraries ( RPA.Browser, RPA.Browser.Playwright, RPA.Browser.Selenium) they do not preserve cookies when closed.
Please let me know what would be the best way to handle this.