That is likely a better question for the
#C2C2JM29M channel if you are looking for step by step instruction. Broadly you create a workflow and apply it to all transactions and run on Create and View or Update. Create a state and Return User Error is a specific action that can be assigned to the state, have condition = Date < 4/13/23
From how you framed your question you may want to read up on workflows, what you are doing is straight forward but it is your first WF some guidance will be beneficial
https://docs.oracle.com/en/cloud/saas/netsuite/ns-online-help/book_N2723865.html