Usually on Curseforge or Modrinth is a tag stating the version it supports (that or if you know most mods work across versions like say 1.16.2 to 1.16.5 while 1.16.1 to 1.16.5 wasn't as common due to changes in 1.16.2 by Mojang not just Fabric or Forge)
To see these tags click the name of the download rather than the download button to see the tags, changelog and more.
That or add mods 1 by 1, update the Forge/Fabric version to be the latest loader version from their own websites and see if that helps or the latest version of a mod listed on appearing under the 1.17.1 (whether a filter or just of available downloads). I have not used 1.17.1 Forge yet so no clue what works and what doesn't but just going off general things to consider with each new version that releases or just experimenting.
Mods on older versions don't work on 1.17.1 either because of the version targeting, the Java 16 change so from that aspect means there is a jump in Java code differences so mods may not be able to and whatever Mojang or Forge have done.
Just strictly use 1.17.1 mods for the best results, use alternative mods to fill in the gap or wait, sometimes mods can work across versions like I said above and other times they don't. Depends on the changes and compatibility so it's always good to think it only targets one version so say 1.17.1 rather than 1.17 or 1.16.1 than 1.16.5 not the whole range of 1.16 versions. With Forge I find it's easy to just stick with 1 version as I usually in the past (even if for recent versions it's been pretty good across versions) while Fabric I know it will usually work across many or it's just the way the mods were designed by the Mod Dev and it's just capable regardless rather than those that just tag tons and aren't.