The best advice for writers is to read as much as possible. Unless you want to write for television or film, in which case you should watch as much as possible. For audio you should listen to as much as possible. Sounds simple. The hard part is forcing yourself to read, watch, or listen to something outside your comfort zone.
Let’s say you write science fiction. You might plough through the classics and pick some modern examples. That will help you understand the genre but could leave you constrained by its limitations. Add some horror and crime fiction to the mix, maybe some romance or something written for a younger audience. Learn from the different techniques applied and see if anything can be adapted for your own work. In this way you create a point of difference between yourself and other writers in the same field.
This is important because boundaries between genres are often blurred as they compete for market share amongst a dwindling readership. Publishers are more likely to commission writers who demonstrate flexibility.