LEO trained M16 armorer.
If it worked at first, that narrows things down to something changed, broke, or moved. Pretty much removes buffer and spring as the culprit. This is all assuming the ammo did not change.
#1! Check the bolts on top of the bolt carrier group holding the gas key in place. If they are not staked sufficiently they will work loose and leak gas in the upper. Some manufacturers have been using thread lock compounds, they don't hold up.
Check the gas block alignment and the gas tube.
Check the bolt as above.
Clean and lube the bcg.
First rule of troubleshooting, make incremental changes. One change at a time.