Any deal that the UK is part of as part of the EU will not apply to the UK after the UK leaves the EU. Researches at the LSE note:
Trade policy for EU Member States is conducted exclusively at the EU level. In case of Brexit, all the EU trade agreements of which the UK is automatically part as an EU member state would need to be re-negotiated on a bilateral basis.
An example is the recent EU-Japan free trade deal, that eliminates or reduces tariffs in a number of areas while allowing for restrictions on, for example, geographical protected names to apply across the EU and Japan. The UK is under pressure from businesses (local and in Japan) to form a trade deal that is substantially the same as that agreed between the EU and Japan.
For example representatives of a law firm said:
There will of course be strong pressure on the UK to replicate the EU’s agreement with Japan as part of its own web of new bilateral trade agreements.
Note this implies that the UK will have to develop a "web of new bilateral trade agreements". In principle, this should be straightforward, if both sides just agree to replicate the agreement that already exists. In practice, all trade deals are exceptionally complex, and while there is no agreement even on the customs arrangements between the EU and the UK, third countries have not been keen to enter into detailed talks.
For example, South Korea has an extensive free trade agreement that came into force in 2015. It has warned the UK government that the conditions of the deal would not apply after 2019, and has asked for concessions from the UK in negotiating a new deal. Essentially Korea sees the UK as being in a weakened negotiating position which allows the Koreans to demand more from the UK in return for the free trade agreement.
The UK could trade with all the G20 countries under existing WTO rules, no country will actually block trade with the UK. However, unless there are free trade agreements in place, tariff and non-tariff barriers to trade will exist.