Importing tkinter isn't needed for this. Possibly, if you have advanced canvas requirements later on, but for now, it can all be done within the Turtle script. Your loop wouldn't loop that way. It needs to be wrapped within your new function, so that it can be called again, when required.
#! /usr/bin/env python3
import turtle as trt
import itertools as it
from time import sleep
import random
t, screen = trt .Turtle(), trt .Screen()
screen .title( 'Take a guess' )
fontname = 'Arial' ## anytime you use a single equal sign, you are assigning a value to a variable.
fontsize = 33 ## larger fontsize
fontstyle = 'normal'
f = ( fontname, fontsize, fontstyle )
computer_num = random .randint( 1, 10 )
## wrap all your instructions in here, so that when you call new
def new_func(): ## it can repeat from this point
## turtle has a numinput box that ensures player types numbers
## instead of letters, and lets you specify min / max values
popup_title = 'Guess'
message = 'Type any number from 1-10'
default_value = 5
## wrap it in an int, to get rid of decimal points
user_num = int( screen .numinput( popup_title, message, default_value, minval = 1, maxval = 10 ) )
t .penup()
t .clear()
t .goto( -50, -25 ) ## so when you jump turtle back home(), text is centered
t .fillcolor( 'red' )
t .begin_fill()
t .color( 'red' )
t .pendown()
a = 4
for _ in it .repeat( None, a ) :
t .fd( 100 )
t .lt( 90 )
t .end_fill( )
t .penup()
t .home()
t .color( 'black' ) ## set to a diff' color than background, for readability
t .write( user_num, align = 'center', font = f )
t .penup()
t .sety( -100 )
t .pendown()
if user_num > computer_num :
t .write( 'Too high', align = 'center', font = f )
sleep( 1 )
new_func() ## call it, to start the loop again
elif user_num < computer_num :
t .write( 'Too low', align = 'center', font = f )
sleep( 1 )
new_func()
else :
t .write( 'Yay! you guessed it!', align = 'center', font = f )
t .hideturtle()
sleep( 3 )
new_func() ## call the function once, so it can begin.