This usually happens if you have msys2 installation on Win7 and upgrade the packages to a version compatible only with win10+. The new OS has additional exports in its kernel and some libraries; these exports were not in place on Win7, so loader will fail.
While the question here is clearly about Cygwin rather than Msys2, similar solutions may apply - keep your runtime libraries in a version which still supports Win7, if you want to continue using that OS.
Details for Msys2 are here:
Is it possible to install MSYS2 on Windows 7?