Friends, I want to make a script that releases the memory of my RB without needing to restart it, I hope you understand me and can help me. Thank you.!

If there is a command for it, it can be done. I have not seen any.
How would the jotne friend script be?
Depends on the command.
I do not think there are such commands.
If your router leak memory, then there are some wrong. Config or try firmware upgrade.
There is no such command to magically free memory. If it’s being used, it’s probably needed for what router is doing.
Memory might be used by some interfaces or functions (conntrack), so it’s possible that disabling interfaces or some functions may free some memory, but that will also break what is router currently doing…
Or it might be memory leak and in that case you should send supout.rif to support@mikrotik.com, just talking about it here on this forum does nothing, this is user forum not mikrotik support.
Yes there is, “/system reboot” ![]()
Maybe disable services that are not being used, i.e. Hotspot, routing, etc in System->Packages.