WebKit, rendering engine for Safari, is open source. As it has to be because it was copylefted KHTML.
But the rest of the browser is not, Safari is closed source. Worth noting is that even if it was, you wouldn’t be able to run version adapted for yourself because you every code executed on Apple devices needs their approval.
Thanks everyone for responces 😊.