Please use fenced code blocks when posting code to this forum. I edited your post to make it legible.
You need to paginate before referencing the .Paginator
properties.
This describes the problem in a little more detail:
https://discourse.gohugo.io/t/determine-if-current-page-is-result-of-pagination/37494/4
This describes a strategy (with example) for doing what you want to do:
https://discourse.gohugo.io/t/control-pagination-and-page-collections-from-baseof-html/37643/8