How can I make this function open a new tab in my actual browser on Python?

You can simply use webbrowser module:

webbrowser.open_new_tab('https://google.com')