As an example, I remember the advice of “just go into data science” being handed out like candy to students interested in industry around the time I was in grad school (10 years ago). To be sure, there was a period where a STEM background + interest could get you in the door, but that time is over. These days you are competing with many equally brilliant students who have taken multiple courses and done research in this area, and it is highly unlikely that an employer will take a chance retraining an e.g. algebraic geometer with no precious data science experience to suit their needs.
All this to say, if you have an interest in another area, you must know the players and their work in that area while simultaneously knowing your area in math. It is not easy by any means, you are essentially signing up for twice as much work learning your field and theirs, but the rewards are great - as a connector between two fields, you have precious expertise that is very employable across a broad range of industries (my first job out of grad school was essentially providing advice on research programs helping connect different STEM communities to government funding agencies, but I was able to use my connections from that job to get back into research).