Cant create a personal IEnumerator

So first of all, please familiarize yourself with how to post code in these forums:

If you post a code snippet, ALWAYS USE CODE TAGS:

How to use code tags: Using code tags properly

Second, there’s like ten billion coroutine tutorials out there on Youtube, and on the Unity Learn link at the top of this page. Doing even one of those tutorials will instantly reveal to you the critical part(s) that you are missing in your coroutine implementation.

Remember, a coroutine is designed to iteratively execute code over time, generally not all at once. If it is all at once, you might as well just make it a function. Know what tool is appropriate for the job, and know also that 100% of all problems solved by a coroutine MAY also be solved without a coroutine. Source: coroutines are a relatively new construct in programming, perhaps only three or four decades old.