Dynamic dataset for a regular page?

You should first make clear what is FRONTEND, what is BACKEND and what is the difference between this 2.

Not every API-CODE provided by wix/velo will work on frontend, also some code-line will not work on backend, which work on frontend.

https://www.wix.com/velo/reference/wix-members-backend/currentmember/getmember

I assume this is your - - → getCurrentMemberFunction() ← - which you were using in your code.

But this function is (like already mentioned before) is just for the BACKEND, it won’t work on frontend.

You will have either to use it (but on BACKEND), or to look for a frontend-supported API which would work on frontend, like here…

https://www.wix.com/velo/reference/wix-members/currentmember/getmember