An electric motor built on/into your gearbox before the gearing is probably the best bet:
You keep the gearing, allowing you to get away with a cheaper smaller motor as you're keeping the gearbox anyway.
The engine would drag on the motor when the clutch is engaged but you get to drive with the main engine off and also get better/more regen.
The disadvantage is the constantly depressed clutch and constant turning of the clutch release bearing that is likely to wear is out way sooner time wise.
Also the other ancillaries on the engine belt stop working, as does your engine vacuum powered brake assist.
With EVs at the scrapyard nowadays you should be able to find electrically driven replacements for all these.
I would say that putting a gear that matches the gear teeth on the input and/or counter shaft on a motor and fitting/mounting it to the gearbox is likely the better cheaper option.
You might even be able to mount the motor direct to the end of the counter shat if the motor's rpms match. It all depends on your specific gearbox.
(You may have to mod the car's transmission tunnel some, somewhere to make space for the motor, but that's not a biggey)
(This shows the gearbox basics for those wondering)
This shows cutting and welding engine crankcases etc to make a 2 cylinder from 2 one cylinders.
As similar modding to your gearbox would be required, it serves to show that cutting, welding and machining a gearbox like casing is pretty straight forward. Inspiration!
While a PM magnet motor is efficient it would 'drag' on the engine when not in use.
A motor with a DC rotor winding is cheaper and you can just cut power to the rotor for coasting (most efficient conservation of energy) and when you don't want to use it like if there's a fault somewhere.
Playing with the rotor voltage opens up all sorts of opportunities! (higher rpm ranges, settings to match controller/regen, etc)
So this cheaper motor option may end up being more efficient overall..?