In this brief guide, you will get to know how to get star fruit seeds.
The star fruit plants spawn at the buff island. To get there, you need a buff key which you can get from killing slimes.
What you want to do is to harvest these plants.
The starfruit seed is a rare drop from other seeds. One tip is to harvest the tomatoes too. This will increase the chance of the starfruit spawning.