Is the message "Unable to take a capture now." displayed?
It may not be possible to takes screenshots in all software, and in some software screenshots may only be possible at certain times.
Is the controller connected to the Nintendo Switch console?
Please check if other buttons on the controller are working. If not, refer to (link to "The controllers are not recognised by the console." in the FAQ).