NExt DNS RAM Low!

Im using openwrt 23.05 in my Xiaomi Mi Router 4C. i install the nextdns and route all my dns to that but. i notice somthing the nextdns luci is not using much ram as dnscrypt and dns over https luci. in nextdns when a user used speedtest it took too much ram like tha available is 20mb when speedtest it took 11mb. what i want to do is used monit the monitoring tool for openwrt and auto restart nextdns when ram is below 10mb. can anyone help me the monit tool icant find any documentation so i dont know how to used it.