You can ask an editor for advice. If the editor has a plan for finding referees then you can probably leave the paper in place for a while longer. Otherwise you can consider withdrawing it and submitting it elsewhere.
But, submitting it to another journal might leave you at the beginning of the same frustrating cycle. There may be overlap between referees at different journals and it might be that your paper has characteristics making review difficult, or especially specialized.
If the journal publish a lot in that area then they probably have a lot of reviewers and some of the "turn-downs" might just be "too busy at the moment".
The editor has an interest, like yours, in getting the process moving.