There are online chain length calculators that can help you with proper chain length. For example:
https://www.bergfreunde.eu/chain-length-calculator/. Also, what is the condition (amount of wear) on the chain ring and cassette/freewheel? If they're too worn it will cause the chasing-teeth to not mesh properly...and 'skip.' Lastly...what is the cleanliness of the gears and chainring? Built-up grime/grease on can cause the chain to not mesh properly with the gears also.
Dan