Modern-day cars and trucks use helical gears and synchromesh equipment in the gearboxes, that synchronize the rotation of gears which might be about to mesh. This gets rid of clashing with the gears and will make gear shifting a lot easier. In this method, the gears are in consistent mesh. https://automobilegearbox64051.angelinsblog.com/33290784/automobile-gearbox-an-overview