Hello a cleat system would be great way to mount heavy items to your wall. This link below might be informative.
This link, How to Build a French Cleat Shelf to Hold Virtually Anything might be helpful.
Tricia, you can use "L" brackets. Size would depend on the space you have and the weight of your desk top. Use more along the length of the desk top if it is very heavy. Be sure a couple of the L brackets are screwed into the wall studs, if possible.
Good advice from janet, using multiple L brackets will spread the weight of your desk top.
It is important that they are attached into the studs.
If you feel this is not going to support the desk top, maybe something like hairpin legs will add even more support.
I would use a French Cleat rated for the weight of your table, it distributes the weight across the wall. Amazon has lots of them, or you can make your own from a piece of would cut lengthwize at a 45 degree angel.