Cook spaghetti according to package directions, drain and set aside.
While spaghetti cooks, melt 2 tablespoons butter in a large skillet over medium-high heat.
Add diced onion and cook for 5 minutes.
Stir minced garlic into the pan and cook for 1 to 2 minutes, continuously stirring to avoid burning. Pour in ½ cup white wine and reduce heat to a simmer.
Once wine is absorbed, add in ¾ cup vegetable broth or seafood stock. Return to a simmer and add chopped razor clams. Season with salt and pepper. Cook for about 2 to 3 minutes, until just cooked.
Add spaghetti back to the pan, season with additional salt and pepper to taste.
Serve with zest and juice of a lemon. Add a bit of shredded parmesan and fresh, chopped parsley, as desired.