Add a “Received” Button to Customer Account Order Actions

I want to Add a “Received” Button to Customer Account Order Actions. I can’t seem to find how to do it and how it could work.I tried adding this code to functions but I can’t understand how it works and what I should make it work as a “Received” button for customers