It sounds like there are 2 problems- does not crank and sometimes cranks but does not start.
Suggest you fix the easier one first- cranking.
If it does not crank, either you have an electrical problem or the engine is hydro locked which means a cylinder has filled with a fluid (antifreeze) which can not be compressed so the engine can not rotate.
Makes sure the battery is fully charges, all battery cables are clean and tight including on the starter and the ground to the block.
If it still will not crank, Bypass the ignition switch starter contact by jumping the battery positive to the small terminal on the solenoid closest to the one which has the battery power on it. Make sure it is in park or neutral before you do this.
If it still does not crank, use a set of jumper cables to connect the terminal on the starter to the positive battery, bypass everything. If it still does not carnk, you probably have a bad solenoid or starter.
The solenoid has to be grounded to the fender through the mounting bracket otherwise it will not connect power to the starter when power is applied to the small terminal. Clean the bracket and fender if needed so you have a good ground.
If you hear a loud clunk from the starter when you try to crank it and the engine rotates slightly, it is probably hydro locked.