Start by finely chopping the onion.
Heat the olive oil in a pot or deep pan over medium heat. Add the chopped onion and cook, stirring occasionally, until it softens and becomes translucent, which usually takes about 5-7 minutes.
Add the spinach and butter to the pot with the softened onion. Season generously with salt and black pepper.
Cook the spinach, stirring, until it wilts completely and is cooked through. This should only take a few minutes.