I'm not sure since I don't have experience on pico 2.
But like other micro controller programming like Arduino etc., adding while True: before the print statement would help it
while True: