refactor function so same code is written only once
Refactor the repeated code into its own private function:

@objc func didClickActionButton(sender: UITapGestureRecognizer) {
    guard let contents = contentList else { return }

    if contents[currentScreenIndex].customMeta["permission-location"] != nil {
        //request Permission
        ApiHelper.shared.initLocationHelperWithBeacon()
    }

    if contents[currentScreenIndex].customMeta["permission-notification"] != nil {
        PushNotificationHelper.requestNotificationAuthorization {
            DispatchQueue.main.async {
                self.advanceOnboarding()
            }
        }
        return
    }

    advanceOnboarding()
}

private func advanceOnboarding() {
    if currentScreenIndex == contents.count - 1 {
        finishOnboarding()
        return
    }

    currentScreenIndex += 1
    showScreenAtPosition(position: currentScreenIndex)
}


I’d also suggest the guard for the early exit, as shown above.


  Is it even worth it to refactor this?


Refactoring this code out into its own function not only avoids the unnecessary repetition (simplifying maintenance in the future), but it also makes this routine much easier to reason about. When first reading your code, it took a few seconds to figure out what you were trying to do, why that code was being repeated, etc. Giving that block of code a clear name makes it easier to grok what’s going on.