How to fork a plugin that's now in core

I was unable to succeed; each attempt resulted in an error. I entered the code into the container and tried to run it, but it did not work (rm -rf plugins/discourse-ai). I added it to the app.yml file as well, yet it still did not resolve the issue.

Could you please kindly explain the exact steps I should follow in a simple manner? Thank you.