Ensure your functions use the correct types, spelling, and capitalisation as below.
The variable collider can be renamed, and access modifiers are not important. The parameters are optional if you are not using them.
OnTriggerEnter2Dvoid OnTriggerEnter2D(Collider2D collider)
{
// Your behaviour here
}OnTriggerStay2Dvoid OnTriggerStay2D(Collider2D collider)
{
// Your behaviour here
}OnTriggerExit2Dvoid OnTriggerExit2D(Collider2D collider)
{
// Your behaviour here
}