I'm trying to modify the text that shows on the standard Access Denied page. I created a module and tried to extend the core class but while module installs fine the page does not get modified. My first question is can Access denied be customized?
Access Denied is an exception and if you want to have control over any aspect how this is handled the best place is an exception event subscriber, see How can we catch the acces denied exception in drupal 8 for the general aspects or Returning alternate HTTP codes for unpublished content in Drupal 8 for an example how to change a 403 to a 404 exception.
I'm trying to modify the text that shows on the standard Access Denied page?
This question is specific for the text, see this answer for a 404 message, How to change page not found page error message in drupal 8?, replace it with 403 for an access denied message.
My first question is can Access denied be customized?
The standard way is of course in the basic site settings admin/config/system/site-information.