It’s impossible to say
There are several hundred (at least) jurisdictions in the world. There are 28 nations in the EU (shortly to be 27) and many of them have sub-national jurisdictions (the UK has 3).
Most of these have restrictions on the “practice of law” and each of those defines “practicing law” differently. In some (e.g. australia) the drafting of contracts is not practicing law, in others (e.g. california) it is.
Further, there may be some classes of contract (e.g. for sale of real estate) that must be drafted by a lawyer and others where it’s not necessary.
Also, what consequences flow from an ‘illegally drafted’ contract will vary. It might be that the contract is still valid even though it exposes the drafter to sanctions, or it might make the contract void. Or voidable.
In most jurisdictions, you can always represent yourself in legal matters, however, a contract always involves someone who is not you.
If you want to ask a specific question (e.g. “Does a contract for [this] in [that] jurisdiction need to be drafted by a lawyer?) then an answer can be found. However, for the general question, the answer is: maybe.