Hi @ingvi,
Thanks for the post.
The error indicates that you are calling the get_field() before ACF has been loaded for the page template.
I would recommend that you call the function from within the acf/init action.
This action is described in detail here: https://www.advancedcustomfields.com/resources/acfinit/
I hope this helps.