Surtling cores in Valheim can be found in dungeons, especially those in the Black Forest.
Surtling Cores in Valheim can be looted from dead Surtlings, but these enemies only appear after advancing safely beyond the Black Forest. So what is a Viking supposed to do? Why, loot the abandoned graves of course! All over the Black Forest in Valheim there are dungeons guarded by skeletons, and in these dungeons there are usually one to ten Surtling Cores, although you can occasionally stumble upon one that doesn't.
Since the worlds of Valheim are procedurally generated, you'll have to wander around a bit to find these dungeons. To be safe (and to make your life easier later), set up an outpost in the Black Forest near the border with the meadows, that way you will have a closer respawn in the event of death, and a location to repair your nearby equipment.
While patrolling the Black Forest, keep an eye out for skeletons near rectangular stone structures: these are the entrances to the Black Forest dungeons. All you have to do is venture inside and explore the crypt. Surtling's cores are shiny red cubes, so you can't miss them. Be on your guard, because these dungeons are defended by skeletons. If you find a pile of bones, destroy it to prevent the skeletons from spawning in the dungeon.
You will want to collect ten Surtling Cores initially to create the Coal Furnace and Foundry, two items that you will want in your farm for A.) Create Coal to power the Foundry, and B.) Melt Copper Ore and pewter plates you can then use to create the Forge. I recommend crafting them in your Black Forest outpost, as both copper and tin are found in this biome and they are heavy. Instead of going back and forth between the biome and your main base, use your Black Forest outpost for all your metalworking needs. Just make sure to farm other Surtling Cores while you're in the Black Forest - they'll allow you to later craft Valheim's Portals and other items basically.