This website is open source! check out the code here.It uses the Wikipedia API to get a random fact (yup theres actualy a wikipedia api that returns a random article). if you have any questions you can dm me on the hackclub slack @max.