Both approaches have merit. You might appreciate the intensity of study that comes from focusing on one at a time. Indeed, digging into the craft of a genre is essential to understanding its nuances. Or you might find switching between the two helps you maximize the benefits of one genre for use in the other. For example, the finite focus on concrete detail to convey meaning in poetry can certainly help you achieve a more effective level of detail in fiction.
An even better approach is to use both options. Begin by shifting between the two different genres. You will practice translating experience, idea, and emotion into words on the page—vital for any kind of creative writing—and you can let your imagination stretch and wander to develop skills in creativity, too. You will also be working on the craft. Plenty of concerns apply to both poetry and fiction, such as the need for concrete, sensory detail, development of voice, and attention to word choice. Lastly, this approach allows you to learn how to choose between genres. If an idea doesn’t come with a clear sense of how to best convey it, you can experiment until you find the one that feels right.
At some point you might find yourself gravitating toward one genre over the other. When that happens, dig deeper into that kind of writing. Poetry and fiction have different structural concerns; they move differently. Each has its own unique set of tools, and its own uses of shared tools. Focusing your time on that genre for a while can give you a deeper understanding of the possibilities and opportunity to concentrate can help you challenge and develop your skills.
Follow your inclinations in terms of how often you focus on one genre and how long you spend shifting between the two. Your exposure to different techniques and readings as well as you own writing interests are bound to play a significant role. Work with those natural tides. You will see your writing improve and learn more about yourself as a poet and a fiction writer.