Insert Commas into ACF number field

You need to ‘hook’ your function to a valid hook. Your add_action call is not doing anything, because it is not a proper call to a hook.. See the docs https://developer.wordpress.org/reference/functions/add_action/ for add_action.

Your function is the second parameter of the add_action hook. The first parameter is ‘where’ to hook into WordPress. If you want to modify the post content, then hook into the_content (see https://developer.wordpress.org/reference/hooks/the_content/ ).

But, then you need to parse the_content to find a number to format. The the_content hook works on the entire post (or page) content, so your function won’t work.

So, not sure that you can do what you want. But if you are going to use hooks, then you need to learn how they work. The above links are a starting point.