The saves of 3DS games were stored inside the cartridge, while for Switch games the save is in the Switch's memory.
You need access to homebrew to extract the save file. Running any form of homebrew can result in a ban, so the best / safest way to gen Pokemon for Sword and Shield is owning a second Switch and trade the Pokemon from the modded Switch to the clean Switch.