You mean in a text? You can use string functions for that. Ex: replaceAll, replace etc.
replaceAll($text, ‘[‘, ‘[[]’)
You can find the documentation:
https://docs.mendix.com/refguide/string-function-calls/
You can use the replaceAll function, but since it interprets the ‘needle’ parameter as a regex you need to escape special character like this:
replaceAll($YourString, '\[', '[[]')