CreateOrUpdate in WordPress

If I’m not too badly mistaken, I don’t think there’s a similar method in $wpdb. replace, https://developer.wordpress.org/reference/classes/wpdb/#replace-row, is kind of like that, but not quite as sophisticated I believe.

You probably need to build a helper function for that yourself, which wraps update, insert and a bit of logic together. Or use query method with custom sql string as suggested here, WPDB Insert or if exists Update.