If you’re getting an infinite loop then that would mean that your call to get_field() is somehow triggering your action to run again. The cause could be any number of things. Debugging something like this would be complicated. Not something I can explain.
Sorry, I don’t know enough about the elementor actions to help you.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users