Strapi v5 :  LifeCycle Hooks AfterUpdate and AfterCreate triggers upon updating a record
### Node Version

20.16.0

### NPM/Yarn/PNPM Version

NPM 10.8.1

### Strapi Version

5.10.3

### Operating System

MacOS

### Database

PostgreSQL

### Javascript or Typescript

Typescript

### Reproduction URL

_No response_

### Bug Description

When creating or updating an entry in Content manager, it creates two records for the table in the database, also see how id 2 is missing here.

<img width="1020" alt="Image" src="https://github.com/user-attachments/assets/b43098b9-7b6e-435f-aa39-3c599e3522f0" />

Also upon updating a record, lifecycle hooks for both afterUpdate and afterCreate gets triggered one after the other.

Is this acceptable behaviour?

### Steps to Reproduce

- Create a content type (Author) in Strapi with a field 'name'
- Add a test record for the new content type
- Add lifecycles.ts in /src/api/[api-name]/content-types/[content-type-name]/
- Add afterCreate and afterUpdate hooks and do a console.log
- Both hooks get executed (afterUpdate -> afterCreate) if you make an update to the test record.

### Expected Behavior

Upon updating a record only afterUpdate hook should be executed, but it executes afterCreate hook as well.

### Logs

```shell

```

### Code Snippets

_No response_

### Media

_No response_

### Additional information

_No response_

### Confirmation Checklist

- [x] I have checked the existing [issues](https://github.com/strapi/strapi/issues) for duplicates.
- [x] I agree to follow this project's [Code of Conduct](https://github.com/strapi/strapi/blob/develop/CODE_OF_CONDUCT.md).