More can always be said on the matter, especially since Medieval medicine has a much-undeserved reputation in Common Knowledge. For the meantime, we have a fair bit of previous posts on the matter of leeching.
Our first stop is of course u/BedsideRounds:
They cover bloodletting here, and leeches in a followup, as leeching is a method of bloodletting;
and their followup answer to this post examines the thinking behind pre-modern medicine. It's not a direct answer to the question of leeches, but it'll help understand why they were considered.
u/Aethereus has a general historical overview on leeching, with u/keyilan also noting its modern-day use in the same thread.
To further riff on the uses of leeches today, a search on PubMed for 'leech' reveals quite a lot of results from a lot of quarters. Enough that I am reasonably confident in saying that it appears a number of doctors do find hirudotherapy (the fancy name for medicinal leeching) to be useful.