Each turn, you have a free object interaction, and can use your action to get a second one, but that won't be necessary for what you're trying to do here. While casting a spell often involves manipulating your spellcasting focus and requires a free hand for the purpose, that doesn't require removing you holy symbol from your neck.
Holy Symbol. [...] A cleric or paladin can use a holy symbol as a spellcasting focus, as described in chapter 10. To use the symbol in this way, the caster must hold it in hand, wear it visibly, or bear it on a shield. (Player's Handbook, Equipment, p.151; emphasis mine)
A spellcaster must have a hand free to access these components, but it can be the same hand that he or she uses to perform somatic components. (Player's Handbook, Spellcasting - Components - Material, p.203)
You're simply touching it or presenting the holy symbol when you use it as a focus. Think of a priest grabbing his crucifix necklace and presenting it to Dracula -- he doesn't need to take it off his neck first, he's just lifting it off his chest a few inches. We can probably just assume holy symbols are commonly worn on a rather long chain to facilitate this sort of thing, but technically the rules don't require that. As long as it's visible and you can touch it with a free hand, you're able to cast.
Assuming you start out wearing the necklace but with it obscured by your shirt, you need a total of three object interactions: One to sheathe your sword (or otherwise free a hand), one to pull the holy symbol into view (still around your neck, but now visible), and one to draw your sword after you finish casting spells. You can take those three interactions in combination with three normal actions.
So, for example, you could:
- 1st turn: Attack with sword, then sheathe it
- 2nd turn: Pull necklace into view and use it to cast a paladin spell
- 3rd turn: Draw your sword and attack with it
There's no real point to trading your turn 1 attack for another object interaction because it turns out you don't actually get to do anything sooner that way:
- 1st turn: Sheathe your sword, then use your action to pull your holy symbol into view
- 2nd turn: Cast a paladin spell, then draw your sword
- 3rd turn: Attack with your sword
Assuming you don't re-hide the holy symbol, in subsequent rounds you can sheathe your sword and cast a spell in the same turn, then the next turn draw your sword and attack, so that makes it very nearly free to switch from melee to spellcasting and back.
You could drop your sword (not an interaction) in order to pull your symbol and cast without the preparation turn, and then picking your sword up still only takes an interaction, so that's an option if you weren't thinking ahead about needing to cast next time around and hadn't sheathed your sword.