It is perfectly normal after a while doing the same job to get restless. Technology changes, environment changes, increasing technical familiarity and continuous apparent novelty mean technical people become less enamored with things that once captivated them. People also change, looking for new challenges.
I should also say that it is also normal to look at others around you and perceive yourself to be inferior. It is easy to look at others' successes, assume it is normal and rate ourselves as inferior. It is just like looking at other's Facebook posts - it is easy to see the stream of parties, holidays and family photos to think others' lives are all like this compared to your own mundanity. While a few may genuinely be like this, most people are quite normal and have plenty of bad days, too.
What would be a good way to identify what works best for you?
First, try to understand what you enjoy and do not enjoy in your current role. Try to emphasize parts you enjoy and de-emphasize those you do not. Ask a peer or confidant to suggest things or give impartial observations. Remember this is what you enjoy, not what you are good at. It also may change over time.
The problem might be your current role, not your career. If you think this might be the case, do something to clear your head. For example, take a holiday, work on a project at home or do some volunteer work. Reduce stress by sleeping better, eating better and getting some exercise. Make time to do something you really enjoy.
Alternatively, consider changing how you work. For example, can you work from home some of the time? Can you work different hours to avoid traffic or reduce the commute? Can you commute by public transport instead of driving or vice versa?
Second, start experimenting with more fringe aspects of your role. For example, if you are in a software development role, volunteer to be the Scrum Master (if you use scrum), write documentation, automate tests, work on requirements with the BA, work on UX, mentor junior developers, stand in for our boss while he/she is on holiday or many of the other things that go into software development. This can give you some temporary novelty or breathing room with little risk. This may help move you toward something new, give you a new appreciation for what you have or both.
It might be helpful to apply for a few different roles in other companies, even if you do not intend to leave your current position. The interview experience and exposure to other companies is useful. If you think it is not your career, just your job, this can be your ticket out.
Third, start reading books, listening to podcasts or attending conferences about things outside your area. Put yourself outside your comfort zone and try to expand your horizons. Go for breadth over depth - try to experience different things and talk to different people. Have patience - you will know when you find things that interest you.
Assuming you think a career change is right for you, do not be afraid to start small. For example, reach out to friends or contacts for part time, casual or volunteer work. At best, it may reinforce your decision and short circuit your career change. At worst, you can walk away with minimal losses.
Make sure you discuss this with your partner (if any). You may decide you want to change careers but may need to delay it until you are both ready. Career changes often involve a financial hit so saving beforehand may also help.