The problem is most likely in the switch's internal mechanism, not the bulb. Before you touch anything, disconnect the circuit from the electrical panel or turn off the circuit breaker for that room. Once you're sure there's no power (test with a flashlight or your phone to verify), you can try opening the switch. Usually it comes apart by loosening the screws on the sides or top, depending on the model.
Once you have it open, look for anything obvious: a loose wire, a broken piece, oxidation, or accumulated dirt. Sometimes the internal contacts wear down and lose contact; if you see that, there's probably not much you can do yourself. But if it's just something dirty, a can of compressed air can help. If you identify a disconnected wire, you can reconnect it there, though it requires care.
If you don't see anything obvious or if it still doesn't work after you close it back up, better call an electrician. It's not expensive to fix and it's safer. The truth is that after checking, you'll probably discover the switch is simply worn out or damaged internally, so you'd have to replace it anyway. It's not worth risking an electrical short to save a few euros.