Check your light fitting in the ceiling or wall. You have a multimeter? Get one if you don’t. Even a cheap one is good enough for this.
How many wires?
Depending on house age you may or may not have protective earth which should be yellow/green or green. Whatever you do, never screw up protective earth and use it as neutral!!!
Then there should be a neutral and a live wire that turns on when the wall switch is on. But often you also have a permanent live wire. Reason is that a common way installations are made is that PE, live and neutral is routed to all wall plugs and all light fittings. And then two wires from the light fitting are routed to the wall switch. That is why so many wall switches have no neutral unless the wallswitch is combined by a power outlet.
If your installation is like this you can move your lamp from the switched live to the permanent live just by moving the live wire. Then the bulb is permanently on.
You still have your wall switch that switches power on and off in the now vacant terminal.
The trick is now to plug a small zigbee or wifi smart switch to the outlet so that
Live and neutral are connected parallel with the lamp so this is also permanently powered. And then connect the switch terminals to neutral and the swiched live wire
The switch does nothing but reporting the state of the wall switch but this is what you need to make your automation.
If you can change the wall switch to momentary by adding a spring then do that. If this is not a standard accessory you can get do not try to add something home made and risk accidents. Then you will have to live with the wall switch being sometimes up and sometimes down when the light is on as it changes its sync each time you toggle the light from another source.
The small smart switch needs to be hidden away where you can fit it. You can often buy a plastic cover for light fittings used to hide a hook the lamp hangs in. I assume the fitting is so high that no kids or animals can fiddle with it.
Except when you measure for voltage always work with circuit breaker off. Not just the wall switch. The circuit breaker in your main installation box (consumer unit in British english). Always measure voltage present first. Then cut the breaker. Then measure again that power is off
The big nonos are
Protective earth must never be used as a neutral. It connects to other PE wires or to metal parts. Only that
Never borrow a neutral wire from another circuit. That also defeats the circuit breaker protection and trips RCDs/GFCIs
Do not be afraid of mains power. Have respect for it. Take pictures and ask someone if you have doubts. Or call electrician.