Everything is working. But the get_field code creates a lot of additional requests in the database due to the fact that it works in a loop. For each iteration of the loop, it creates an additional 3 queries to the database.
Is there any way to get all the required fields at once, don’t use a cycle? With one overall request?