I often prefer functions when starting a new project, but classes are a great when your code base grows and you want/ need to better encapsulate code and manage state.
For a deeper dive into when to use classes, check out my article: https://pybit.es/articles/when-classes