NEW ANSWER:
If you only need those modes called via the command line, this task is easier. Since ConTeXt stores command line data in the environment namespace, let's take advantage of this:
\startluacode
local listofcalledmodes = function()
local split = string.split
local flag = '^--c:mode='
local concat = table.concat
for _, v in pairs(environment.originalarguments) do
if v:find(flag) then
local w = split(v:gsub(flag, ""), ",")
context(concat(w, " "))
return
end
end
context("No modes set")
end
interfaces.implement{
name = "listofcalledmodes",
public = true,
actions = listofcalledmodes
}
\stopluacode
\starttext
\startTEXpage
My list of modes: \listofcalledmodes
\stopTEXpage
\stoptext
Compiling your file the following way (159.tex is my file):
context --mode=amode,anothermode,toomanymodes 159.tex
I get the following result:

OLD ANSWER:
I'll ask for a feature request to the mailing list so a proper macro is available. In the meantime, the following should do the work most of times. Since modes are registered at the TeX end with as command sequences named with a mode> prefix (in core-env.mkiv and core-env.mkxl), we can look up at them in tex.hashtokens (related discussion here). However, if I get you right, you don't want system modes (internal, marked with an asterisk), so they will be filtered out:
\startluacode
local function listofmodes()
local s1, s2 = "^mode>[^%*]+", "^mode>"
context.blank() -- change this ad libitum
for _, v in pairs(tex.hashtokens()) do
if v:find(s1) and tex.modes[v:gsub(s2, "")] then
context(v:gsub(s2, ""))
context.par() -- also change this if needed
end
end
end
interfaces.implement{
name = "listofmodes",
public = true,
actions = listofmodes
}
\stopluacode
\starttext
Hi, there's a list of used modes: \listofmodes
\stoptext
However, you may need a workaround, setting hash_extra=0 in some cases (issue discussed here), so you're warned.

mkivin my document and I runcontext --mode=espa1,espa1a,espa2,espa2a,espa3,espa3a,espa4,espa4a --nonstopmode --noconsole --purgeall myfile.conTeXt– somenxavier Apr 29 '21 at 14:12interfaces.implement{ name = "listofmodes", public = true, actions = listofmodes } \stopluacode
\starttext
\startmode[a1] Això és a1 \stopmode
Jols
\stoptext```
– somenxavier Apr 29 '21 at 21:31\listofcalledmodes. Is there any way to just give a space before that: something likefoo amode anothermode ...instead of `foo \n amode anothermode..."? – somenxavier May 20 '21 at 14:11return? – somenxavier May 20 '21 at 14:13par(orcontext.par()in the Lua side) on purpose. You only need to remove it and changegoto donebyreturn. I'll edit my answer – May 20 '21 at 14:35parin your new code – somenxavier May 20 '21 at 16:35