How to write my code so that it adjusts to mobile screen for p5.js?

Hey everyone, I was just wondering if I have a code that when I upload it as a website it works on a desktop, but then how would I write it out so that it also adjusts to a mobile screen as well. The code is in p5.js and I uploaded it as a website through Github. When on a mobile screen, it doesn’t show the best results.

Any recommendations or resources would be great!

Perhaps this discussion gives you an option how to solve your problem Setting size of display window to a percentage of screen size