Not connected. Select a board and port to connect automatically

Keep getting "Not connected. Select a board and port to connect automatically." message when opening the serial monitor. Anybody got any idea how to fix this? my sketches verify and upload fine as the blink programme has got the LED on my Raspberry pico 2040 so the board and com port are obviously connected.
When I upload a sketch that requires reading data from an ultrasonic sensor I need the serial monitor to write the data but not sure how to fix this. Any suggestions would be appreciated.

Thank you.