Pipe the whole loop into `nc`:
while true; do
echo 'lol'
sleep 1
done | nc -l 9000
This will start a single instance of `nc`, listening for connections on port 9000, and send “lol” once per second to it.
Note that “lol”s will accumulate until the connection is opened, so you might see a number of “lol”s send immediately on connection. You could add a delay at the start:
(sleep 5
while true; do
echo 'lol'
sleep 1
done) | nc -l 9000