Automatically open last solution when starting Visual Studio
Tools -> Options then change the Startup option.
More Details Check this link
In Visual Studio 2019 the option is slightly different. Select:
Tools / Options / Startup / Most recent solution
I'll add solution for Visual Studio Code: use this flag in shortcut:
"C:\Program Files\Microsoft VS Code\Code.exe" --reuse-window
VS Code command arguments