VAT returns are not the same as self-assessment/self employment returns. Sounds like you filed your personal/self assessment tax return for the period you were self-employed, but didn't file a VAT return for that same period. If you tell HMRC you are no longer self-employed, that only deals with the self-employment part, you would still be VAT registered until you formally deregister for VAT. On your government gateway, you should go to "Add services" and then "add" the VAT service to your gateway and then the VAT returns that is outstanding should reveal itself, you can then file a Nil VAT return, but you may need to use MTD software in order to do so (ie, you can't file the VAT return via the government gateway), you can also deregister for VAT from the gateway but only once there are no outstanding VAT returns. The £18 owed for VAT is an estimate, HMRC will guess how much you owe them, if you owe nothing because you've ceased to trade, then once a Nil VAT return is filed then the £18 will disappear and be replaced with nothing due/nothing owed. Maybe call/contact the General VAT helpline for more assistance
VAT: general enquiries