Cant use app store on imac

I've just purchased a iMac second hand. It wont let me install anything from the app store. When I go to download an app i click on "get" and it doesn't do anything. Please can someone help.
Are you signed in to the App Store with your Apple ID and is the iMac connected to the internet?
Yes I think I am signed in. And I'm definitely connected to the internet.

Original thread: https://forums.imore.com/threads/cant-use-app-store-on-imac.392849/