Hi, and Welcome to the Apple (user-to-user) Community
Re: MacBook Air keeps shutting off
Wondering which MacBook Air Model (Year) you have.
Eg: How to: Identify your MacBook Air model – Apple Support
and
What you were mostly using the Mac for, when you first encountered this issue:
Eg: update / restore / using memory intensive software / adding heaps of data ?
___________________________________________________________________
Re: I replaced the battery so it’s not the battery
Wondering if that happened just prior to the issue appearing ?
(Genuine Apple Battery / Replacement ?)
________________________________________________________-
Re: the screen just goes black
Apple support articles:
What to do: If your Mac starts up to a blank screen - Apple Support
If your Mac doesn't turn on – Apple Support
If your Mac doesn't start up all the way – Apple Support
_____________________________________________________
Re: "I can’t get into safe mode because the computer shuts off before I can"
Ways to start up your Mac – Apple Support
Wondering if your Mac is struggling for space in which to operate.
If possible:
How to: See used and available storage space on your Mac – Apple Support
Eg: A Mac needs at least 50 Gb free for the Operating System to work smoothly
How to Free up storage space on your Mac - Apple Support
If you don't have a recent back up, it is wise to first back everything up if you can.
How to view: View memory usage in Activity Monitor on Mac – Apple Support
___________________________________________________________________
Re: "is there anything else I’m able to do to figure out why my computer keeps doing this"
More Support:
There is a "Get Support" link (online chat, phone, eMail etc.) at the bottom of the MacBook Air Website:
MacBook Air - Official Apple Support
All the best :-)