This tutorial goes over using Nucleus Co-op with a script by Talos91 to allow for multiple instances of Hollow Knight on the same PC, and how to use HKMP to connect those instances into the same server. Note that Nucleus Co-op can only be used on Windows.
This tutorial assumes you already installed the HKMP mod following the steps from the main article. If you haven't, do so before proceeding.
This version of Nucleus is pretty new. If you find bugs that prevent you from using it properly, check if your issue is addressed in the FAQ section, and if that fails ask in the Nucleus Discord.
nucleus
Steam: C:\\Program Files (x86)\\Steam\\steamapps\\common\\Hollow Knight
If you moved the Steam folder somewhere else, you can right-click Hollow Knight on Steam, click Manage, then click Browse local files to see where it is located
GoG: Click the symbol next to the play button > Manage Installation > Show Folder, to see where the folder is located