My code doesn't display the score and the button doesn't work as expected

I am attempting to make a red circle using turtle that displays a number in the center the represents the percentage for failing, and with each click the number grows. Thus the chance for failing grows, but the score after the highscore isn’t displayed and the retry button doesn’t work as expected.

import turtle
import random
import pygame
turtle.hideturtle()
turtle.penup()
tap = turtle.Turtle()
tap.hideturtle()
high = turtle.Turtle()
high.hideturtle()
high.penup()
num = turtle.Turtle()
num.hideturtle()
count = 0
rando = 2
score = 0
score_dictionary = {}
pygame.init()
sound_file = r'C:\Users\Yarden\OneDrive\Documents\Python\Recording.wav'
high.goto(0, 100)
high.write('Highscore: ', score, align = 'center', font = ('Comic Sans MS', 30))
def play_sound(sound_file):
    pygame.mixer.init()
    pygame.mixer.music.load(sound_file)
    pygame.mixer.music.play()
def click(x, y):
    global count
    if -100 <= x <= 100 and -100 <= y <= 100:
        count += 1
        rando = random.randint(1, 100)
        turtle.hideturtle()
        circle_number(count)
        tap.clear()
        if rando <= count:
            turtle.goto(0, -150)
            turtle.write('You Lost!', align='center', font=('Comic Sans MS', 30))
            turtle.onscreenclick(None)
            play_sound(sound_file)
            turtle.goto(-100, -200)
            turtle.fillcolor('#03fc2c')
            rectangle(200, 50)
            turtle.goto(0, -240)
            turtle.write('Retry', align='center', font=('Fixedsys', 30))
            def click2(x, y):
                global score
                if count > score:
                    score = count
                if -100 <= x <= 100 and -25 <= y <= 25:
                    turtle.Screen().onclick(click2)
                    count = 0
                    rando = 0
                    circle_number(count)
                scores_sorted = dict(sorted(scores.items(), key=lambda x: x[0], reverse=True))
def circle():
    turtle.tracer(0)
    turtle.hideturtle()
    turtle.goto(0, 0)
    turtle.dot(200, 'Red')
    turtle.color('Black')
    tap.goto(0,-30)
    tap.write('Tap!', align = 'center', font = ('Ink Free', 30))
    turtle.hideturtle()
def circle_number(number):
    circle()
    num.goto(0, -30)
    num.write(number, align = 'center', font = ('Ink Free', 30))
    turtle.update()
def rectangle(width, height):
    turtle.begin_fill()
    for _ in range(2):
        turtle.forward(width)
        turtle.right(90)
        turtle.forward(height)
        turtle.right(90)
    turtle.end_fill()
turtle.speed(0)
turtle.Screen().onclick(click)
circle()
turtle.mainloop()