The 'breeding' section in sources like seriously fish might give you an idea of whether they're wild caught or captive bred. Generally if they're easy to breed they'll be captive bred as it's more profitable than catching them in a remote location, transporting them to a holding facility and then on to an airport.
As others have said some fish will demand a higher price if wild caught and will be sold as such. Equally some fish that are normally wild caught but have been captive bred will also be advertised as such and demand a higher price e.g the marine Mandarin 'Synchiropus splendidus'.
Personally I'm a bit sceptical on how environmentally friendly some of the things highlighted in some of the documentaries that were shared in another thread on here are. I can't find the thread but this is the first part of the
documentary. The documentaries are a bit biased towards the aquarium trade. They say that it prevents logging but also say that the areas wouldn't be logged because they are more difficult to access/have seasonal/environmental hazards. They also say that there are lots of unstudied species that could be exported. If they're unstudied how can they say that it's sustainable to catch them?
I'm an environmental scientist by training, which I was probably influenced towards by keeping fish at an early age. I've also worked in the fishkeeping industry and know that it's not great for the environment. So I'm often in a moral/ethical quandary and have spent hours deliberating over
keeping xyz species because I know its source and impacts. Where I can I've tried to source fish, coral, shrimp etc from local breeders and hobbyists.
I'd also urge everyone to try and breed every species they keep, regardless of source. It's a fascinating aspect to keeping fish and I think you get a better understanding of their requirements. Plus you can give something back by bringing some fishy lives into this world that haven't been unsustainably/unethically sourced.