Rinse and soak the black-eyed peas overnight
In a large pot, heat olive oil over medium heat.
Add chopped onion and sauté until translucent, about 5 minutes.
Stir in minced garlic and cook for an additional minute until fragrant.
Add in the drained black-eyed peas and sauté for a couple of minutes.
Pour in the chicken or vegetable broth and add the ham hock or diced ham.
Season with cayenne pepper, salt, and pepper.
Bring to a boil, then reduce to a simmer, cover, and cook for 45 minutes or until the peas are tender.
Taste and adjust seasoning as needed before serving warm.