Audio API not playing on iphone safari when importing audio from github

so im just starting in react js and I was practicing my skills with a music website. It’s a typical music reproductor, theres songs and you click on them and audio starts playing corresponding to the song you clicked to. The audio files are stored in a github repo and are imported to my website using the fetch with an async function. Everything seems to work, when I uploaded this website netlify and tried to play the audio in my iphone (safari) audio wouldn’t start. On every other device and browser seems to work, I tried on opera, google and edge on my windows pc, and in google on linux. Also I tried it on google android and they all seem to work just fine, it’s just on safari that this audio seems to not be playing. I don’t know what is happening.

This is my code:

const builder = 'https://raw.githubusercontent.com/myUser/myRepo/main/audios/';
      const handleClick =  (e) => async () => 
      {
        const response = await fetch(builder + e.audio + '.m4a');
        const data = await response.arrayBuffer();
        const blob = new Blob([data], { type: response.headers.get('Content-Type') });
        const audio = new Audio(URL.createObjectURL(blob));
      
        const context = new AudioContext({
          sampleRate: 44100,
        });
          const source = context.createMediaElementSource(audio);
          source.connect(context.destination);

          audio.addEventListener('ended', () => {
              setInfoCopy((infoCopy) => {
                const currentIndex = infoCopy.findIndex((song) => song.audio === e.audio);
                const nextIndex = currentIndex === infoCopy.length - 1 ? 0 : currentIndex + 1;
                const nextSong = infoCopy[nextIndex];
                console.log(nextSong);
                handleClick(nextSong)();
                return infoCopy;
              });
            });
            
            if(play){
              play.pause();
              play.currentTime = 0;
            }

            updateCurrentSong(e);
            setPlay(audio);
            audio.play();
      };

And no, that is not the actual link to my github repo, I just took out the parts because I don’t know if that information can be posted freely. Please help I tried everything, not even chatGPT could resolve this.