I'm testing on both Ubuntu and Windows for my actions but it kept failing at Lines 102 - 107 due to wget only available when the OS is set to Ubuntu.

A quick fix of having a conditional step for this or using suisei-cn/actions-download-file workflow can be applied to prevent such errors.
This line would suffice for the latter option:
- name: Download fabric-api v${{ inputs.fabric-api }}
uses: suisei-cn/actions-download-file@818d6b7dc8fe73f2f924b6241f2b1134ca1377d9
with:
url: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api/${{ inputs.fabric-api }}+${{ inputs.mc }}/fabric-api-${{ inputs.fabric-api }}+${{ inputs.mc }}.jar
target: "run/mods"