Wait for events after loading a screen

What do you want to achieve?

I have a small application made of a few screens. In one of the screens, I want to wait for NFG tags to be detected and perform a few operations with their data that will be used to update the screen.

What I want to know is how to achieve that. Should I just use a while (true) {} inside the function that handles the event screen_loaded?

Oh no… You need create event based system.

Even if you use threads you should have a waiter in the while loop not to consume all CPU-power for waiting, but according to your post you’d like to wait for NFG tags in the same thread as lv_task_handler(). Yes, you can wait in the same while main-loop (or IRQ) where lv_task_handler resides, but it should be non-blocking as much as possible. In other words you poll the presence of the new data in every cycle of the loop (hopefully this polling itself is fast enough to not hog the loop and increase response time), and when the data arrives you can display it by lv_set_label or similar functions.
(If the polling function itself takes too much time, i.e more than several milliseconds, you need to take it apart into shorter phases and use a state machine to follow where the operation is at any moment.)