This is a good practice to wait for some time while creating and updating, because object creating and object updating takes some time to reflect, so wait for a bit until the first process will successfully completed, we really recommend this to avoid unwanted failure.
Hope this make sense
Thanks