I don't know how to tell if my Nintendo switch is under warranty.
The company's official service centers can use the console serial number to check the warranty period. There is a white barcode-like sticker on the Nintendo Switch that can be used to determine if it is under warranty.