Keyholes are a great option to mount shelves and artwork to the wall. While you can cut them with a router bit, brackets like these can be a lot stronger, not only because they are made out of metal, but also because they have a slanted groove that pulls them into the wall.
Installing these can be a little tricky, but here I show exactly how to cut the recesses necessary to attach them.
Brackets I used: https://amzn.to/33y5Luz