Writing tablet compatible with Mac
You could purchase a Huion tablet from Amazon, I don't know if they are available in your region. They're quite cheap, I haven't personally tried them but based on the good reviews it looks like they do their job. 

Here are two of them: 

https://www.amazon.es/dp/B00DTPYWBG/ref=cm_sw_r_cp_api_0b9aCb8TDP9VH

https://www.amazon.es/dp/B00DM24HNE/ref=cm_sw_r_cp_api_di9aCb85MMQRV

There are also the Wacom tablets, I've used them before and I can say that they worked very well. 

They can be expensive but there are a few cheaper ones like the Intuos S, I believe it was. It's specifically a drawing tablet but you could use it for writing. 

Here it is:

https://www.wacom.com/en-us/products/pen-tablets/wacom-intuos

And for the software, you could use Krita (a free painting app) or Photoshop CC. You could also find other apps in the Mac Store as well. 

EDIT: There is a video I found:

https://youtu.be/T0uBv5od8xU

He's using Windows but there's a version of OneNote available for Mac. It converts the hand written equations into text. It's awesome!